/// <summary> /// Start Button to start the game /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnStart_Click(object sender, EventArgs e) { msg = false; game.Status = PongGame.GameStatus.Running; game.Start(); timer.Start(); gameRenderer.Focus(); }
static void Main(string[] args) { var game = new PongGame(); game.Start(new ApplicationConfig() { WindowSize = new Vector2i(1920, 1080), }); }
private static void Main(string[] args) { var game = new PongGame(); game.Start(new ApplicationConfig() { WindowSize = new Vector2i(1920, 1080), WindowTitle = "Aximo Pong", IdleRenderFrequency = 0, IdleUpdateFrequency = 0, RenderFrequency = 0, UpdateFrequency = 0, VSync = VSyncMode.Off, //IsMultiThreaded = false, }); }
private void ButtonPressed(object sender, EventArgsInput e) { e.SuppressButton(); if (e.Button == SButton.Space) { game.Start(); } else if (e.Button == SButton.Escape) { if (game.HasStarted()) { game.Reset(); } else { Game1.quit = true; Game1.exitActiveMenu(); } } else if (e.Button == SButton.P) { game.TogglePaused(); } }