mirror of
https://github.com/tetreum/brickcraft.git
synced 2026-01-27 04:58:27 -06:00
23 lines
497 B
C#
23 lines
497 B
C#
using UnityEngine;
|
|
|
|
public class SoundManager : MonoBehaviour {
|
|
|
|
public const string EFFECT_TAPPING = "tapping";
|
|
public const string EFFECT_DIG = "dig";
|
|
public const string EFFECT_REMOVE_BLOCK = "removeblock";
|
|
|
|
private AudioSource stereo;
|
|
|
|
public static SoundManager Instance;
|
|
|
|
void Awake () {
|
|
Instance = this;
|
|
stereo = GetComponent<AudioSource>();
|
|
}
|
|
|
|
public void play (string name) {
|
|
stereo.clip = Resources.Load("Sound/Effects/" + name) as AudioClip;
|
|
stereo.Play();
|
|
}
|
|
}
|