public void ApplyKnockdown()
        {
            if (isKnockedDown)
            {
                return;
            }

            isKnockedDown = true;
            StartCoroutine(KnockdownTimer());

            animController.SetAnimBool(animController.animData.isKnockedDown, true);
            animController.PlayAnimationHash(animController.animData.knockDownAnimationClass);
            limbsController.EnableEntireRagdoll();
            hitboxController.DisableHitboxes();
            healthController.doorCollider.SetActive(false);
            healthController.notificationCollider.SetActive(false);

            if (inventoryController.currentWeaponRuntime != null)
            {
                droppedWeapon = inventoryController.currentWeaponRuntime;
            }

            inventoryController.DropCurrentInHandWeapon(false);
            StartCoroutine(DisableAnimatorTimer());

            knockDownNotificationCollider.enabled = true;
            stateController.ChangeState(AIStateType.KNOCKEDDOWN);
        }
Esempio n. 2
0
        void PlayerEnteredFOV()
        {
            if (stateController.currentState != AIStateType.COMBAT)
            {
                if (stateController.currentState == AIStateType.KNOCKEDDOWN)
                {
                    return;
                }

                stateController.ChangeState(AIStateType.COMBAT);
            }
        }