Exemple #1
0
 protected override void SetupSounds()
 {
     for (int i = 0; i < Enum.GetNames(typeof(music)).Length; i++)
     {
         music name = (music)i;
         AddSound2D(name.ToString());
     }
 }
Exemple #2
0
 public void musicSounds(music s, bool playing)
 {
     musicPlayer.clip = music[(int)s];
     Debug.Log("current s: " + s.ToString() + ", music player: " + musicPlayer.name);
     if (playing && !musicPlayer.isPlaying)
     {
         musicPlayer.Play();
         Debug.Log("is playing");
     }
     else if (!playing)
     {
         musicPlayer.Stop();
     }
 }
Exemple #3
0
 public void Stop(music sound, bool immediate)
 {
     base.Stop(sound.ToString(), immediate);
 }
Exemple #4
0
 public void Stop(music sound)
 {
     base.Stop(sound.ToString());
 }
Exemple #5
0
 public void Pause(music sound)
 {
     base.Pause(sound.ToString());
 }
Exemple #6
0
    //========================================================================================================================
    //========================================================================================================================
    //Не трогать

    public void Play(music sound)
    {
        base.Play(sound.ToString());
    }