Exemple #1
0
    private void ProcessMacheteHit(Machete machete)
    {
        //AudioSource.PlayClipAtPoint(hitSound, Camera.main.transform.position, hitSoundVolume);
        machete.CreateMacheteHitFX();
        Vector2 macheteVelocity = machete.GetMacheteDeathHitVelocty() * new Vector2(DirectionOfPlayer(), 1);

        bodyPartRigidBody.velocity = macheteVelocity;
    }
Exemple #2
0
 private void ProcessMacheteHit(Machete machete)
 {
     health -= machete.GetDamage();
     machete.CreateMacheteHitFX();
     zombieMovement.zombieRigidBody.velocity += machete.GetMacheteHitVelocity() * new Vector2(-playerPosition.DirectionOfPlayer() * machetteHitVelocityMulitplier, 1);
     zombie.zombieAnimator.SetTrigger("TakingDamage");
     zombie.zombieAnimator.SetBool("Biting", false);
     zombie.zombieAnimator.SetBool("Running", true);
     CheckIfDead();
 }