public UnitFSM(UnitController controller) {
     StateIdle idleState = new StateIdle(controller);
     AddState(idleState);
     AddState(new StateMove(controller));
     AddState(new StateAttack(controller));
     AddState(new StateAttackMove(controller));
     AddState(new StateChase(controller));
     AddState(new StateHoldPosition(controller));
     defaultState = idleState;
     Reset();
 }
        public UnitFSM(UnitController controller, GameplayManager gm)
        {
            StateIdle idleState = new StateIdle(controller, gm);

            AddState(idleState);
            AddState(new StateMove(controller, gm));
            AddState(new StateAttack(controller, gm));
            AddState(new StateAttackMove(controller, gm));
            AddState(new StateChase(controller, gm));
            AddState(new StateHoldPosition(controller, gm));
            defaultState = idleState;
            Reset();
        }