Пример #1
0
    public void Stun(Vector3 knockbackDirection)
    {
        if (!blocking)
        {
            //if holding rock drop it
            if (rockBody != null)
            {
                rockBody.useGravity = true;
                holding             = false;
            }

            stunCounter = stunDuration;
            stunned     = true;

            rb.AddForce(knockbackDirection * dashingKnockBack, ForceMode.Acceleration);
            pAudioManager.PlayHitSound();
        }
    }