protected override void SetupSounds() { for (int i = 0; i < Enum.GetNames(typeof(music)).Length; i++) { music name = (music)i; AddSound2D(name.ToString()); } }
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(); } }
public void Stop(music sound, bool immediate) { base.Stop(sound.ToString(), immediate); }
public void Stop(music sound) { base.Stop(sound.ToString()); }
public void Pause(music sound) { base.Pause(sound.ToString()); }
//======================================================================================================================== //======================================================================================================================== //Не трогать public void Play(music sound) { base.Play(sound.ToString()); }