Exemplo n.º 1
0
 private void Awake()
 {
     states = new Dictionary <PirateState, PirateStateBase> ();
     states.Add(PirateState.Patrol, new PatrolState(this));
     states.Add(PirateState.Alert, new AlertState(this));
     states.Add(PirateState.Chase, new ChaseState(this));
     currentState = states [PirateState.Patrol];
 }
Exemplo n.º 2
0
 public void MakeTransition(PirateState state)
 {
     Debug.Log(state);
     currentState = states[state];
     currentState.StartState();
 }