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

            runtime.SetPlaylist(playlist, fade);
        }
Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #4
0
        internal void Stop(string player)
        {
            MusicPlayerRuntime runtime = playerRuntimes[player];

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

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

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

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

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

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

            runtime.UnPause();
        }