public bool TryPerformTransition(string edge) { if (Current == null) return false; State state = Current.Step(edge); if (state == null) return false; Current = state; // Debug.Log("Enter(" + edge + "): " + Current.Id); Current.NotifyOnEnter(); return true; }
public bool TrySetStateById(string id) { foreach(State s in _states) { if (s.Id == id) { Current = s; //Debug.Log("Enter: " + Current.Id); Current.NotifyOnEnter(); return true; } } return false; }