Update
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
using UnityEngine;
|
||||
using Hallucinate.Audio;
|
||||
|
||||
public class LaserProjectile : MonoBehaviour
|
||||
{
|
||||
public float speed = 5f;
|
||||
public float lifeTime = 5f;
|
||||
|
||||
[Header("Audio")]
|
||||
public string hitSound = "Laser_Hit";
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Destroy(gameObject, lifeTime);
|
||||
@@ -24,6 +28,8 @@ public class LaserProjectile : MonoBehaviour
|
||||
{
|
||||
Debug.Log("Player Hit");
|
||||
|
||||
AudioManager.Instance?.Play(hitSound, position: transform.position);
|
||||
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user