First commit on my server, yey!

This commit is contained in:
Sebastian Bularca
2026-03-19 18:12:07 +01:00
parent 5139ec2cec
commit fedd1961a0
602 changed files with 101587 additions and 6 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() { }
}
}