First commit

This commit is contained in:
sbularca
2026-05-19 15:52:04 +02:00
commit 27b7aeee46
1660 changed files with 240354 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using Nox.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
namespace Nox.Core {
/// <summary>
/// This is an example for the first game state which in our case would usually contain a gdpr
/// This is an example to show how it could be initialized and also how it could boot into the next game state
/// Ideally a SceneHandler/Manager of sorts should handle loading and unloading scenes.
/// </summary>
public class SplashGameState : IGameState {
private readonly BootstrapReferences bootStrapInitializer;
private readonly GameDataState gameDataState;
public bool IsGameStateInitialized { get; set; } = true;
public SplashGameState(BootstrapReferences bootStrapInitializer, GameDataState gameDataState) {
this.bootStrapInitializer = bootStrapInitializer;
this.gameDataState = gameDataState;
}
public void EnterGameState() {
DisclaimerReference gdprReference = Addressables.InstantiateAsync(bootStrapInitializer.splashUIReference).WaitForCompletion().GetComponent<DisclaimerReference>();
gdprReference.continueButton.onClick.AddListener(() => {
gameDataState.ChangeGameState(GameState.MainMenu);
Object.Destroy(gdprReference.gameObject);
});
}
public GameState Tick() {
return GameState.BootState;
}
public void LateTick() { }
public void Dispose() { }
public void ExitGameState() { }
}
}