internal void Resume() { if (_bgmPlayer != null && _currentSong == this) { _bgmPlayer.Resume(); } }
//Resume the music public static void ResumeMusic() { if (musicPlayer != null && musicPlayer.Status != BgmStatus.Playing) { musicPlayer.Resume(); } }
/// <summary> /// 恢复音乐 /// </summary> public void MusicResume() { if (MusicPlayer != null && MusicPlayer.Status == BgmStatus.Paused) { MusicPlayer.Resume(); } musicStatus = SoundComanndStatus.Play; }
public virtual int ResumeMusic() { if (_musicPlayer != null) { _musicPlayer.Resume(); } return(0); }
public static bool Update() { uint enableColor = 0xffffffff; uint disableColor = 0xff7f7f7f; playButton.ButtonColor = disableColor; stopButton.ButtonColor = disableColor; pauseButton.ButtonColor = disableColor; resumeButton.ButtonColor = disableColor; if (bgmPlayer.Status == BgmStatus.Stopped) { playButton.ButtonColor = enableColor; } else if (bgmPlayer.Status == BgmStatus.Playing) { stopButton.ButtonColor = enableColor; pauseButton.ButtonColor = enableColor; } else if (bgmPlayer.Status == BgmStatus.Paused) { stopButton.ButtonColor = enableColor; resumeButton.ButtonColor = enableColor; } List <TouchData> touchDataList = Touch.GetData(0); if (playButton.ButtonColor == enableColor && playButton.TouchDown(touchDataList)) { bgmPlayer.Play(); } if (stopButton.ButtonColor == enableColor && stopButton.TouchDown(touchDataList)) { bgmPlayer.Stop(); } if (pauseButton.ButtonColor == enableColor && pauseButton.TouchDown(touchDataList)) { bgmPlayer.Pause(); } if (resumeButton.ButtonColor == enableColor && resumeButton.TouchDown(touchDataList)) { bgmPlayer.Resume(); } volumeSlider.Update(touchDataList); bgmPlayer.Volume = volumeSlider.Rate; return(true); }
public void play() { if (bgmPlayer == null || bgm == null) { return; } if (bgmPlayer.Status != BgmStatus.Playing) { if (bgmPlayer.Status == BgmStatus.Paused) { bgmPlayer.Resume(); } else { bgmPlayer.Play(); } } }
public override void Update(float dT) { uiTime.Text = "Time: " + ScoreManager.Instance.getTime(); uiScore.Text = "Score: " + ScoreManager.Instance.getScore(); foreach (Tank tank in tankList) { tank.Update(dT); tank.rotateTurret(player.Position(), dT); if (player.isTouching() && player.Collision(tank.getPosition(), tank.getSize())) { alive = false; } } player.Update(); if (player.isTouching()) { ScoreManager.Instance.runScore(); if (bgSoundPlayer.Status == BgmStatus.Paused) { bgSoundPlayer.Resume(); } else if (bgSoundPlayer.Status != BgmStatus.Playing) { bgSoundPlayer.Play(); } } else { bgSoundPlayer.Pause(); } if (!alive) { bgSoundPlayer.Dispose(); ScoreManager.Instance.setScore(); SceneManager.Instance.setEndScene(); } Director.Instance.Update(); }