예제 #1
0
        void FixedUpdate()
        {
            HashSet <KeyCommand> activeCommands = _inputCommandController.GetActiveCommands();

            if (activeCommands.Count > 0)
            {
                _movementSystem.UpdateMoveCommand(activeCommands);
            }

            for (int i = 0; i < _tailBehaviours.Count; i++)
            {
                if (i > 0)
                {
                    _tailBehaviours[i].PushCommand(_tailBehaviours[i - 1].GetCurrentCommand());
                }
                else
                {
                    _tailBehaviours[i].PushCommand(_movementSystem.CurrentCommand);
                }
            }
        }
예제 #2
0
 public void PushCommand(KeyCommand keyCommand)
 {
     _movementSystem.UpdateMoveCommand(keyCommand);
 }