Exemplo n.º 1
0
        public void eventReceived(IGameEvent e)
        {
            if (e is PlayMusicEvent)
            {
                PlayMusicEvent musicEvent = e as PlayMusicEvent;
                AudioClip      audioClip  = null;
                musicClipDictionary.TryGetValue(musicEvent.getAudioClipName(), out audioClip);

                if (audioClip != null)
                {
                    PlayMusic(audioClip, musicEvent.doesLoop());
                }
            }
        }
Exemplo n.º 2
0
 private void OnPlayMusic(PlayMusicEvent gameEvent)
 {
     PlayMusic(gameEvent.clip, gameEvent.loop);
 }