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(); } }
public void Register(BIRDSTATE state, Action action) { if (transitions.ContainsKey(state)) { transitions[state] += action; } else { transitions.Add(state, action); } }