private void UpdateHelpWindow(GameTime gameTime) { _HelpWindow.Width = (int)(spriteBoard.ViewportWidth * Global.BoardScaleH - Global.BoardScaleH * 96 * 2); _HelpWindow.ScreenPosition = new Vector2(Global.BoardScaleH * 96, (int)(Global.ScreenHeight - _HelpWindow.Height - Global.BoardScaleV * 8)); _HelpWindow.Update(gameTime); if (_CurrMouseTarget != null && _PrevMouseTarget != _CurrMouseTarget) { Global.SFXManager.Card.Play(); _HelpWindow.Open(); _HelpWindow.Text = ((TripleTriadCard)_CurrMouseTarget).Name; } else if (_CurrMouseTarget == null) { _HelpWindow.Close(); } }
public override void Update(GameTime gameTime) { base.Update(gameTime); if (Global.KeyboardManager.IsKeyPressedAndReleased(Keys.Enter)) { if (GameRule.Random) { TripleTriadGame.GenerateTestHands2(); Global.SceneManager.CurrentScene = new Scene_Triple_Triad_Main(); } //else // Global.SceneManager.CurrentScene = new Scene_PickCards(); } _HelpWindow.Width = (int)(background.ViewportWidth * Global.BoardScaleH - Global.BoardScaleH * 64 * 2); _HelpWindow.ScreenPosition = new Vector2((int)(Global.BoardScaleH * 64), (int)(Global.ScreenHeight - _HelpWindow.Height - Global.BoardScaleV * 16)); _HelpWindow.Update(gameTime); _RuleWindow.ScreenPosition = new Vector2((int)(Global.BoardScaleH * 64), (int)(Global.BoardScaleV * 16)); _RuleWindow.Width = (int)(background.ViewportWidth * Global.BoardScaleH - Global.BoardScaleH * 64 * 2); _RuleWindow.Height = (int)(_HelpWindow.ScreenPosition.Y - _RuleWindow.ScreenPosition.Y - Global.BoardScaleV * 8); _RuleWindow.Update(gameTime); }