// -------------------------------------------------------------------------------------------- private void Awake() { _stateMachine = new TofuStateMachine(); _stateMachine.Register(State.Loading, Loading_Enter, null, Loading_Exit); _stateMachine.Register(State.Root, Root_Enter, null, Root_Exit); _stateMachine.Register(State.Disabled, null, null, null); }
// -------------------------------------------------------------------------------------------- private void Awake() { _stateMachine = new TofuStateMachine(); _stateMachine.Register(State.LogIn, LogIn_Enter, null, null); _stateMachine.Register(State.LoadAssets, LoadAssets_Enter, null, null); _stateMachine.ChangeState(State.LogIn); }
// -------------------------------------------------------------------------------------------- private void Awake() { _stateMachine = new TofuStateMachine(); _stateMachine.Register(State.LoadEssentials, LoadEssentials_Enter, LoadEssentials_Update, null); _stateMachine.Register(State.LogIn, LogIn_Enter, null, null); _stateMachine.Register(State.InitializeLocalPlayer, InitializeLocalPlayer_Enter, null, null); _stateMachine.ChangeState(State.LoadEssentials); }
// -------------------------------------------------------------------------------------------- private void Awake() { if (_instance != null) { Debug.LogError("Only one instance of InGameController can exist at at a time"); Destroy(this); } _instance = this; _stateMachine = new TofuStateMachine(); _stateMachine.Register(State.Loading, Loading_Enter, Loading_Update, null); _stateMachine.Register(State.InGame, InGame_Enter, InGame_Update, null); _stateMachine.Register(State.PostGame, PostGame_Enter, null, null); }
protected override void Awake() { base.Awake(); _assetManager = new AssetManager(); _version = new Version($"{Application.version}.{BuildNumberUtil.ReadBuildNumber()}"); Debug.Log($"GridRPG {_version} (c) 2020 Tofunaut"); _stateMachine = new TofuStateMachine(); _stateMachine.Register(State.Initialize, Initialize_Enter, Initialize_Update, null); _stateMachine.Register(State.StartMenu, StartMenu_Enter, null, null); _stateMachine.Register(State.InGame, InGame_Enter, null, null); _stateMachine.ChangeState(State.Initialize); }
// -------------------------------------------------------------------------------------------- protected override void Awake() { base.Awake(); _version = string.Format("{0}{1}{2}", Application.version, Version.Delimeter, BuildNumberUtil.ReadBuildNumber()); Debug.LogFormat("{0} v{1} (c) {2} {3}", Application.productName, _version, Application.companyName, "2019"); DontDestroyOnLoad(gameObject); _stateMachine = new TofuStateMachine(); _stateMachine.Register(State.Initializing, Initializing_Enter, Initializing_Update, Initializing_Exit); _stateMachine.Register(State.AppStartup, AppStartup_Enter, null, null); _stateMachine.Register(State.StartMenu, StartMenu_Enter, null, null); _stateMachine.Register(State.InGame, null, null, null); _stateMachine.ChangeState(State.Initializing); }
// -------------------------------------------------------------------------------------------- protected override void Awake() { base.Awake(); // test objects are for messing around in the scene and should be destroyed immediately Destroy(_testObjectsRoot); DontDestroyOnLoad(gameObject); AppVersion = new Version(string.Format("{0}{1}{2}", Application.version, Version.Delimeter, BuildNumberUtil.ReadBuildNumber())); Debug.Log($"GridStrategy {AppVersion} (c) Tofunaut 2020"); AccountManager.AuthenticatedSuccessfully += AccountManager_AuthenticatedSuccessfully; AccountManager.FailedToAuthenticate += AccountManager_FailedToAuthenticate; _stateMachine = new TofuStateMachine(); _stateMachine.Register(State.Initializing, Initializing_Enter, null, Initializing_Exit); _stateMachine.Register(State.StartMenu, StartMenu_Enter, null, StartMenu_Exit); _stateMachine.Register(State.InGame, InGame_Enter, null, InGame_Exit); _stateMachine.ChangeState(State.Initializing); _assetManager = new AssetManager(); }
private void Awake() { _stateMachine = new TofuStateMachine(); _stateMachine.Register(State.Loading, Loading_Enter, Loading_Update, null); _stateMachine.Register(State.InGame, InGame_Enter, InGame_Update, null); }