// -------------------------------------------------------------------------------------------- private void AppStartup_Enter() { AppStartupController appStartupController = gameObject.RequireComponent <AppStartupController>(); appStartupController.enabled = true; appStartupController.Completed += AppStartupController_Completed; }
// -------------------------------------------------------------------------------------------- private void AppStartupController_Completed(object sender, ControllerCompletedEventArgs e) { AppStartupController appStartupController = sender as AppStartupController; appStartupController.Completed -= AppStartupController_Completed; appStartupController.enabled = false; _stateMachine.ChangeState(State.StartMenu); }