private void InitializeStateMachine(AIStateMachine _sm) { var _states = new Dictionary <Type, BaseState>() { { typeof(PatrolState), new PatrolState(_me: this) }, { typeof(ChaseState), new ChaseState(_me: this) } }; _sm.SetStates(_states); }