Sounds added
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ExplosionSoundManager : MonoBehaviour {
|
||||
|
||||
static AudioSource asrc;
|
||||
|
||||
|
||||
// Use this for initialization
|
||||
void Awake () {
|
||||
if (asrc == null)
|
||||
{
|
||||
asrc = GetComponent<AudioSource>();
|
||||
asrc.Play();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LateUpdate () {
|
||||
asrc = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user