public override void ProcessEvent() { _btmBar.ProcessEvent(); _servingArea.ProcessEvent(); _sideBar.ProcessEvent(); if (SwinGame.TimerTicks(_gameTime) > 500) { _ticks = _ticks + 1; SwinGame.ResetTimer(_gameTime); } //change view to end if give up button clicked if (SwinGame.MouseClicked(MouseButton.LeftButton)) { if (_giveUpButton.IsAt(SwinGame.MousePosition())) { _viewManager.View = _viewManager.PauseScreenForMedium; } } if (_ticks > 125) { SwinGame.LoadSoundEffect("victory.wav"); SwinGame.PlaySoundEffect("victory.wav"); _viewManager.View = _viewManager.StartDifficult; } }
public override void ProcessEvent() { _btmBar.ProcessEvent(); _servingArea.ProcessEvent(); _sideBar.ProcessEvent(); //change view to end if give up button clicked if (SwinGame.MouseClicked(MouseButton.LeftButton)) { if (_giveUpButton.IsAt(SwinGame.MousePosition())) { _viewManager.View = _viewManager.ZYEnd; } } if (ZYSideBar.winStar == 3) { ZYEnd.winOrLose = true; SwinGame.LoadSoundEffect("victory.wav"); SwinGame.PlaySoundEffect("victory.wav"); _viewManager.View = _viewManager.ZYEnd; } }