Пример #1
0
        public override void ExitState()
        {
            CustomDebug.LogMessage("Idle exit!", DebugColor.red);
            ICommand command = new ChangeAnimationCommand(owner, GetType());

            command.Execute();
        }
Пример #2
0
        public override void ExitState()
        {
            _movementLogic.InteractObstacle();
            CustomDebug.LogMessage("Move exit!", DebugColor.red);
            ICommand command = new ChangeAnimationCommand(owner, GetType());

            command.Execute();
        }
Пример #3
0
        public override void EnterState()
        {
            CustomDebug.LogMessage("Move enter!", DebugColor.green);
            CustomDebug.LogMessage(owner.StatusController.GetSpeedModificator());
            ICommand command = new ChangeAnimationCommand(owner, GetType(), owner.StatusController.GetSpeedModificator());

            command.Execute();
        }
Пример #4
0
        public override void ExitState()
        {
            owner.StatusController.SetReloadTime(Time.time);
            CustomDebug.LogMessage("Attack exite!", DebugColor.red);
            ICommand command = new ChangeAnimationCommand(owner, GetType());

            command.Execute();
        }
Пример #5
0
        public override Type UpdateState()
        {
            if (Time.time >= timerToFlip)
            {
                ICommand command = new ChangeAnimationCommand(owner, GetType(), 1f);//TODO подумать как отвязаться от фикс значеий!
                command.Execute();
                timerToFlip = ResetTimer();
            }

            return(GetType());
        }