// Start is called before the first frame update void Start() { stateMachine = new FiniteStateMachine(); currentActions = new Stack <GoapAction>(); planner = new GoapPlanner(); FindEnemyTypeComponent(); InitializeActions(); planner.Initialize(gameObject, availableActions); CreateIdleState(); CreateMoveToState(); CreatePerformActionState(); stateMachine.PushState(idleState); }