50% audio implement

This commit is contained in:
Vladdie
2022-05-01 06:46:35 -05:00
parent 3a2896a2a7
commit 36d9c98a2b
22 changed files with 1550 additions and 146 deletions

View File

@@ -5,7 +5,7 @@ using UnityEngine;
public class Bumper : MonoBehaviour {
public float bumpPower = 30;
public AudioSource bumpNoise;
// Is called whenever something collides with the bumper
void OnTriggerEnter(Collider objectHit) {
if (objectHit.gameObject.tag == "ArcherTarget") {//Checks if the other object is the player
@@ -19,7 +19,7 @@ public class Bumper : MonoBehaviour {
if(dirBump.x == 0 && dirBump.z == 0){
dirBump = new Vector3(1,.1f,1);
}
bumpNoise.Play();
playerMovement.GetHit(dirBump.normalized, bumpPower);
//
}