예제 #1
0
 public void ChangeState(FSMStat <T> NewState)
 {
     PreviousState = CurrentState;
     if (PreviousState != null)
     {
         //Debug.Log(Owner + "EXITED STATE: " + PreviousState);
         PreviousState.Exit();
     }
     //Debug.Log(Owner + "ENTERED STATE: " + NewState);
     CurrentState = NewState;
     CurrentState.Enter(Owner);
 }
예제 #2
0
 public void Awake()
 {
     CurrentState  = null;
     PreviousState = null;
 }
예제 #3
0
 public void Initialize(T owner, FSMStat <T> InitialState)
 {
     Owner = owner;
     ChangeState(InitialState);
 }