public static void SetGame(GameClass game) { if (Game != null) { Game.Dispose(); } Game = game; if (game != null) { game.Init(); } }
public override void Update(float time) { if (NextTest == true && Keyboard[OpenTK.Input.Key.Escape] == false) // jos testissä painettu ESC { if (game != null) { game.Dispose(); } //testNo = Rnd.Next(5) + 1; // debug switch (testNo) { case 1: game = new Test2D(); game.Init(); break; case 2: game = new TestParticles(); game.Init(); break; case 3: game = new TestPath(); game.Init(); break; case 4: game = new TestAnimation(); game.Init(); break; case 5: game = new TestSoftParticles(); game.Init(); break; case 6: BaseGame.Running = false; game.Dispose(); game = null; return; } testNo++; NextTest = false; } game.Update(time); base.Update(time); }
public override void Update(float time) { if (NextTest == true && Keyboard[OpenTK.Input.Key.Escape] == false) // jos testissä painettu ESC { if (game != null) game.Dispose(); //testNo = Rnd.Next(5) + 1; // debug switch (testNo) { case 1: game = new Test2D(); game.Init(); break; case 2: game = new TestParticles(); game.Init(); break; case 3: game = new TestPath(); game.Init(); break; case 4: game = new TestAnimation(); game.Init(); break; case 5: game = new TestSoftParticles(); game.Init(); break; case 6: BaseGame.Running = false; game.Dispose(); game = null; return; } testNo++; NextTest = false; } game.Update(time); base.Update(time); }
public static void SetGame(GameClass game) { if (Game != null) Game.Dispose(); Game = game; if (game != null) game.Init(); }