Пример #1
0
    protected virtual void switchCrouch()
    {
        BurinkeruCharacterController burinkeruCharacterController = (BurinkeruCharacterController)characterController;

        if (burinkeruCharacterController.IsCrouching)
        {
            burinkeruCharacterController.ExitCrouch();
        }
        else
        {
            burinkeruCharacterController.EnterCrouch();
        }
    }
Пример #2
0
    void enterCrouch()
    {
        BurinkeruCharacterController characterController = (BurinkeruCharacterController)this.characterController;

        if (characterController == null)
        {
            return;
        }

        if (groundedInternalState != null && groundedInternalState is PlayerRunState)
        {
            slide();
        }

        characterController.EnterCrouch();
    }