public void Dispose()
 {
     if (_currentSong == this && _bgmPlayer != null)
     {
         _bgmPlayer.Stop();
         _bgmPlayer.Dispose();
     }
     _bgm.Dispose();
 }
示例#2
0
        private void PlatformDispose(bool disposing)
        {
            if (_currentSong == this && _bgmPlayer != null)
            {
                _bgmPlayer.Stop();
                _bgmPlayer.Dispose();
            }

            _bgm.Dispose();
        }
示例#3
0
        public override void OnExit()
        {
            player.Stop();
            music.Dispose();
            player.Dispose();

            sprite.TextureInfo.Dispose();

            this.RemoveAllChildren(true);

            base.OnExit();
        }
示例#4
0
        /// Terminate
        public static void Term()
        {
            bgmPlayer.Stop();
            bgm.Dispose();

            playButton.Dispose();
            stopButton.Dispose();
            pauseButton.Dispose();
            resumeButton.Dispose();
            volumeSlider.Dispose();

            SampleDraw.Term();
            graphics.Dispose();
        }
示例#5
0
        public override void OnExit()
        {
            lumberMillList.RemoveAllChildren(true);
            mineAndStrongHoldList.RemoveAllChildren(true);
            mineDrillList.RemoveAllChildren(true);
            lumbermillSheetTextureInfo.Dispose();
            mineSheetTextureInfo.Dispose();
            strongHoldAndMineSheetTextureInfo.Dispose();

            worldmap.TextureInfo.Dispose();

            boombox.Stop();
            music.Dispose();
            boombox.Dispose();

            this.RemoveAllChildren(true);

            Console.WriteLine(lumbermillSheetTextureInfo.Disposed.ToString() + " " + mineSheetTextureInfo.Disposed.ToString() + " " + strongHoldAndMineSheetTextureInfo.Disposed.ToString());
        }
示例#6
0
 public void close()
 {
     stop();
     bgmPlayer.Dispose();
     bgm.Dispose();
 }
示例#7
0
 public void Dispose()
 {
     _bgm.Dispose();
     _sfx.Dispose();
 }
示例#8
0
        /// <summary>
        /// Sets the bgm.
        /// BGMをPlayerにセットする。
        /// BGMプレイヤーは同時に2つ以上存在できない
        /// </summary>
        /// <param name='bgmStr'>
        /// Bgm string.
        /// </param>
        public static void SetBgm(String bgmStr)
        {
            //BGMの初期化。
            EndBgm();
            Bgm = new Bgm(bgmStr);
            BgmPlayer = Bgm.CreatePlayer();
            Bgm.Dispose();
            Bgm=null;
            BgmPlayer.Loop = true;
            BgmOn = true;

            SetBgmMute();
        }