// public event Action<BaseState> OnStateChanged; public void SetStates(Dictionary <Type, BaseState> states) { availableStates = states; currentState = availableStates.Values.First(); }