protected void TerminateConstruction() { TerminateConstructionInternal(); UnityAction <BaseMenu> cb = TemporaryVariableManager.GetTemporaryVariable <UnityAction <BaseMenu> >(this, _onConstructionCompleteCBIndex); cb?.Invoke(this); }
protected void TerminateTransitionIn() { TerminateTransitionInInternal(); UnityAction <BaseMenu> cb = TemporaryVariableManager.GetTemporaryVariable <UnityAction <BaseMenu> >(this, _onTransitionInCBIndex); cb?.Invoke(this); }
protected void TerminateTransitionOut() { TerminateTransitionOutInternal(); UnityAction <BaseMenu> cb = TemporaryVariableManager.GetTemporaryVariable <UnityAction <BaseMenu> >(this, _onTransitionOutCBIndex); cb?.Invoke(this); _baseMenuFSM.SetState(BaseMenuStates.Disabled); }
protected override void InitializeSingleton() { base.InitializeSingleton(); _appManagerFSM = new FSM <AppStates>(); _appManagerFSM.Initialize(this, Constants._frameworkFsmInitPrefix, Constants._frameworkFsmUpdatePrefix, Constants._frameworkFsmTerminatePrefix); _appManagerFSM.SetState(AppStates.Foreground); _temporaryVariableMaintainence = TemporaryVariableManager.GetMaintainenceDelegate(); }
protected void TerminateDestruction() { TerminateDestructionInternal(); UnityAction <BaseMenu> cb = TemporaryVariableManager.GetTemporaryVariable <UnityAction <BaseMenu> >(this, _onDestructionCompleteCBIndex); cb?.Invoke(this); // I mean 0 offense when i say this, buuuuuuut.... // ALLAHU AKBAR! GameObject.Destroy(this.gameObject); }
/// <summary> /// Construction routine. /// </summary> //dont like the fact that this has to be public, unfortunately c# has no chill for friends :/ :p public void Construct(int configurationVariant = 0, UnityAction <BaseMenu> onComplete = null) { _baseMenuFSM = new FSM <BaseMenuStates>(); _baseMenuFSM.Initialize(this, Constants._frameworkFsmInitPrefix, Constants._frameworkFsmUpdatePrefix, Constants._frameworkFsmTerminatePrefix); TemporaryVariableManager.SetTemporaryVariable <UnityAction <BaseMenu> >(this, _onConstructionCompleteCBIndex, onComplete, true); ConfigurationApplicator.Instance.ApplyConfiguration(this.GetType(), this.gameObject, configurationVariant); _baseMenuFSM.SetState(BaseMenuStates.Construction); _baseMenuFSM.UpdateStateMachine(); }
/// <summary> /// sets menu state to transitioning out /// </summary> /// <param name="onComplete"></param> public virtual void TransitionOut(bool skipTransition = false, UnityAction <BaseMenu> onComplete = null) { TemporaryVariableManager.SetTemporaryVariable <UnityAction <BaseMenu> >(this, _onTransitionOutCBIndex, onComplete, true); if (skipTransition) { OnSkipTransition(BaseMenuStates.TransitionOut); onComplete?.Invoke(this); _baseMenuFSM.SetState(BaseMenuStates.Disabled); return; } _baseMenuFSM.SetState(BaseMenuStates.TransitionOut); }
public virtual void Destruct(UnityAction <BaseMenu> onComplete = null) { TemporaryVariableManager.SetTemporaryVariable <UnityAction <BaseMenu> >(this, _onDestructionCompleteCBIndex, onComplete, true); _baseMenuFSM.SetState(BaseMenuStates.Destruction); }