Ejemplo n.º 1
0
 public void NextState()
 {
     currState += 1;
     Debug.Log(string.Format("Leaving {0}, Heading to {1} <- {2}", currState - 1, currState, this.name));
     if (transitions.ContainsKey(currState - 1))
     {
         transitions[currState - 1].Invoke();
     }
 }
Ejemplo n.º 2
0
 public void Register(BIRDSTATE state, Action action)
 {
     if (transitions.ContainsKey(state))
     {
         transitions[state] += action;
     }
     else
     {
         transitions.Add(state, action);
     }
 }