Example #1
0
        internal void SetPlaylist(string player, string playlistName, float fade)
        {
            MusicPlayerRuntime runtime  = playerRuntimes[player];
            Playlist           playlist = bank.GetPlaylist(playlistName);

            runtime.SetPlaylist(playlist, fade);
        }
Example #2
0
        private void Update()
        {
            float dt = Time.unscaledDeltaTime;

            Dictionary <string, MusicPlayerRuntime> .Enumerator enumerator = playerRuntimes.GetEnumerator();
            while (enumerator.MoveNext())
            {
                MusicPlayerRuntime runtime = enumerator.Current.Value;
                runtime.Update(dt);
            }
        }
Example #3
0
        public void Init(MusicBank bank_)
        {
            playerRuntimes.Clear();
            bank = bank_;

            foreach (MusicPlayer player in bank.Players)
            {
                MusicPlayerRuntime runtime = new MusicPlayerRuntime(transform, player);
                if (player.Playlist != null)
                {
                    runtime.SetPlaylist(player.Playlist);
                }

                playerRuntimes.Add(player.Name, runtime);
            }
        }
Example #4
0
        internal void Stop(string player)
        {
            MusicPlayerRuntime runtime = playerRuntimes[player];

            runtime.Stop();
        }
Example #5
0
        internal void Play(string player, float fade)
        {
            MusicPlayerRuntime runtime = playerRuntimes[player];

            runtime.Play(fade);
        }
Example #6
0
        internal void Play(string player)
        {
            MusicPlayerRuntime runtime = playerRuntimes[player];

            runtime.Play();
        }
Example #7
0
        internal void Seek(string player, string track, float fade)
        {
            MusicPlayerRuntime runtime = playerRuntimes[player];

            runtime.Seek(track, fade);
        }
Example #8
0
        internal void Next(string player)
        {
            MusicPlayerRuntime runtime = playerRuntimes[player];

            runtime.Next();
        }
Example #9
0
        internal void UnPause(string player, float fade)
        {
            MusicPlayerRuntime runtime = playerRuntimes[player];

            runtime.UnPause(fade);
        }
Example #10
0
        internal void UnPause(string player)
        {
            MusicPlayerRuntime runtime = playerRuntimes[player];

            runtime.UnPause();
        }