public void ChangeToPreviousState() { curState.TerminalExitState(); if (prevState != null) { curState = prevState; } curState.TerminalEnterState(); }
public void ChangeTerminalState(ITerminalState newState) { if (curState != null) { curState.TerminalExitState(); } prevState = curState; curState = newState; curState.TerminalEnterState(); }
public void ChangeState(ITerminalState toState) { this.newTerminalStateMachine.ChangeTerminalState(toState); if (newTerminalStateMachine.CurState is IdleState) { buddyList.SetActive(true); //buddyList.GetComponent<BuddyListController>().PopulateBuddyList(); buddyList.GetComponentInChildren <BuddyListController>().StartPopulate(); } else { buddyList.SetActive(false); } if (newTerminalStateMachine.CurState is ConnectState) { mainText.SetActive(true); } else { mainText.SetActive(false); } }