예제 #1
0
    public void Crouch(bool crouch)
    {
        Debug.Log("Crouching " + crouch);

        if (gameObject.CompareTag("Player"))
        {
            CameraManager.Instance.ToggleCrouch(crouch);
        }

        AdjustCharControl(crouch);

        if (charAnimator != null && charAnimator.isActiveAndEnabled)
        {
            charAnimator.SetBool("Crouch", crouch);
        }

        if (playerCont != null)
        {
            playerCont.Crouch(_isCrouching);
        }
    }