Exemplo n.º 1
0
    void Start()
    {
        SFXManager = this;

        for (int i = 0; i < ClipName.Count; i++)
        {
            SFXLib.Add(ClipName[i], ClipList[i]);
        }
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        DontDestroyOnLoad(gameObject);

        foreach (Sound s in sounds)
        {
            s.source      = gameObject.AddComponent <AudioSource> ();
            s.source.clip = s.clip;

            s.source.volume = s.volume;
            s.source.pitch  = s.pitch;
            s.source.loop   = s.loop;
        }
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Awake()
 {
     Instance = this;
     SFXAudio = GetComponent <AudioSource>();
     DontDestroyOnLoad(this);
 }