Beispiel #1
0
        private float AgentSpeed()
        {
            if (InputConfig.Run() && isMoving)
            {
                staminaComponent.ConsumeStamina(staminaCost);
            }
            float speed = isRunning ? agent.runSpeed : agent.walkSpeed;

            return(speed);
        }