Beispiel #1
0
        public BackgroundMusicDependency()
        {
            audioManager = GameDependencies.Get <AudioManager>();

            channel = audioManager.GetAvailableChannel();
            audioManager.ClaimChannel(channel);
        }
        public void Play()
        {
            if (backgroundMusic == null)
            {
                backgroundMusic = GameDependencies.Get <BackgroundMusicDependency>();
            }

            backgroundMusic.Play(selection, loop);
        }
 protected void Awake()
 {
     backgroundMusic = GameDependencies.Get <BackgroundMusicDependency>();
 }