コード例 #1
0
 public void ChangeToPreviousState()
 {
     curState.TerminalExitState();
     if (prevState != null)
     {
         curState = prevState;
     }
     curState.TerminalEnterState();
 }
コード例 #2
0
 public void ChangeTerminalState(ITerminalState newState)
 {
     if (curState != null)
     {
         curState.TerminalExitState();
     }
     prevState = curState;
     curState  = newState;
     curState.TerminalEnterState();
 }
コード例 #3
0
 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);
     }
 }