Added full cycle, now the gui shows the proper party data

This commit is contained in:
Sebastian Bularca
2026-04-06 01:27:10 +02:00
parent 50832c491c
commit 236bf1a647
11 changed files with 621 additions and 597 deletions

View File

@@ -3,6 +3,7 @@ using Jovian.ZoneSystem;
using Nox.Core;
using Nox.Platform;
using Nox.Game.UI;
using Nox.UI;
using ZLinq;
using UnityEngine;
using UnityEngine.AddressableAssets;
@@ -37,6 +38,7 @@ namespace Nox.Game {
private AdventureSettings adventureSettings;
private TimeHandler timeHandler;
private PartyInventoryHandler partyInventoryHandler;
private PartyGuiView partyGuiView;
public AdventurePlayMode(
PlatformSettings platformSettings,
@@ -130,6 +132,12 @@ namespace Nox.Game {
adventureView ??= new AdventureView(gameDataState, guiReferences, inputActions, adventureData, adventureSettings);
adventureView.Initialize();
if(partyGuiView == null && guiReferences.partyMemberSlotPrefab != null) {
var portraitsHolder = Addressables.LoadAssetAsync<PortraitsHolder>("PortraitsHolder").WaitForCompletion();
partyGuiView = new PartyGuiView(guiReferences.portraitsContainer, guiReferences.partyMemberSlotPrefab, portraitsHolder);
partyGuiView.Initialize(partyDefinition);
}
IsGameModeInitialized = true;
}
@@ -142,6 +150,7 @@ namespace Nox.Game {
partyInventoryHandler.Tick();
partyMovementHandler.Tick();
adventureView.Tick();
partyGuiView?.Tick();
if(inputActions.UI.PauseMenu.WasPerformedThisFrame()) {
gameDataState.ChangePlayMode(PlayMode.PauseMenu);
@@ -168,6 +177,7 @@ namespace Nox.Game {
public void Dispose() {
cameraController?.Dispose();
partyMovementHandler?.Dispose();
partyGuiView?.Dispose();
}
}