Browse Source

Renamed MusicManager to MusicController

master
chrisgregan 11 years ago
parent
commit
520b86b90b
  1. 14
      Assets/Fungus/Audio/Scripts/MusicController.cs
  2. 0
      Assets/Fungus/Audio/Scripts/MusicController.cs.meta

14
Assets/Fungus/Audio/Scripts/MusicManager.cs → Assets/Fungus/Audio/Scripts/MusicController.cs

@ -9,21 +9,21 @@ namespace Fungus
* Music playback persists across scene loads. * Music playback persists across scene loads.
*/ */
[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioSource))]
public class MusicManager : MonoBehaviour public class MusicController : MonoBehaviour
{ {
static MusicManager instance; static MusicController instance;
/** /**
* Returns the MusicManager singleton instance. * Returns the MusicController singleton instance.
* Will create a MusicManager game object if none currently exists. * Will create a MusicController game object if none currently exists.
*/ */
static public MusicManager GetInstance() static public MusicController GetInstance()
{ {
if (instance == null) if (instance == null)
{ {
GameObject go = new GameObject("MusicManager"); GameObject go = new GameObject("MusicController");
DontDestroyOnLoad(go); DontDestroyOnLoad(go);
instance = go.AddComponent<MusicManager>(); instance = go.AddComponent<MusicController>();
} }
return instance; return instance;

0
Assets/Fungus/Audio/Scripts/MusicManager.cs.meta → Assets/Fungus/Audio/Scripts/MusicController.cs.meta

Loading…
Cancel
Save