示例#1
0
 public void ChangeState(CellState nextState)
 {
     currentState.OnExitState(this);
     currentState = nextState;
     currentState.OnEnterState(this);
 }
示例#2
0
 private void Start()
 {
     currentState = new InactiveCell();
     currentState.OnEnterState(this);
 }