void Awake() { stopSong = new MStopSong(); playSong = new MPlaySong { songSource = GetComponent <AudioSource>() }; logSong = new MAnalyticSong(); }
private void OnStopSong(MStopSong stopSong) { if (curSong < 0) { return; } FadeIn(chAmbient); FadeOut(chMusic); mSongDone.songIndex = curSong; msg.Dispatch(mSongDone); curSong = -1; source.Stop(); source.clip = null; }