Пример #1
0
        public virtual float GetWishSpeed()
        {
            var ws = Duck.GetWishSpeed();

            if (ws >= 0)
            {
                return(ws);
            }

            if (Input.Down(InputButton.Run))
            {
                return(SprintSpeed);
            }
            if (Input.Down(InputButton.Walk))
            {
                return(WalkSpeed);
            }

            return(DefaultSpeed);
        }