forked from Shardstone/trail-into-darkness
Added full cycle, now the gui shows the proper party data
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user