Beispiel #1
0
        protected virtual void CheckDownSelection()
        {
            // no relavent input, restart cooldown
            if (!playerInput.IsDownPress() && !playerInput.IsDown())
            {
                downWait.StopCoroutine();
                return;
            }

            // single press, just move along
            if (playerInput.IsDownPress())
            {
                MoveDown();
                downWait.StartCoroutine();
                return;
            }

            // hold, go if off cooldown
            if (playerInput.IsDown())
            {
                if (downWait.IsRunning)
                {
                    return;
                }
                MoveDown();
                downWait.StartCoroutine();
            }
        }
 private void CheckDescend()
 {
     if (!controller.isGrounded || player.InputDisabled)
     {
         return;
     }
     if (playerInput.IsDownPress())
     {
         isDescending = true;
     }
 }