void game_OnCheckGameInputs(MainGameEventArgs e) { WinAPIUtil.POINT pt = WinAPIUtil.GetCursorPos(); GenericStage stage = e.Game.Stage as GenericStage; if (stage != null) { stage.NextUserPosition = new Vector2D( this.GetXWithAspect(pt.x - this.Left), stage.Position.Y + this.GetYWithAspect(pt.y - (this.Top + 20))); } }
public override void CheckMainInputs() { base.CheckMainInputs(); if (WinAPIUtil.GetKeyState(13) != startStage) { this.State = StageState.Finished; } if (WinAPIUtil.GetKeyState(27) < 0) { this.State = StageState.ExitGame; brushDraw = Brushes.Coral; } }
public virtual void CheckMainInputs() { /*if (WinAPIUtil.GetKeyState(69) < 0) * this.IsRunning = false;*/ short currentPauseStatus = WinAPIUtil.GetKeyState(80); if (currentPauseStatus < 0) { currentPauseStatus = lastPauseStatus == 0 ? (short)1 : (short)0; } if (lastPauseStatus != currentPauseStatus) { if (this.IsPaused) { this.State = StageState.Running; } else { this.State = StageState.Pause; } } lastPauseStatus = currentPauseStatus; }