public override void Update() { PhysicsManager.Update(); UpdateManager.Update(); PhysicsManager.CheckCollisions(); SpawnManager.Update(); }
public static void Play() { GfxManager.Load(); player = new Player("player", new Vector2(window.Width / 2, window.Height / 2)); bg = new Background("bg", Vector2.Zero, -220); string[] joysticks = Game.window.Joysticks; for (int i = 0; i < joysticks.Length; i++) { if (joysticks[i] != null && joysticks[i] != "Unmapped Controller") { NumJoysticks++; } } while (window.opened) { //totalTime += GfxTools.Win.deltaTime; Console.SetCursorPosition(0, 0); Console.Write((1 / window.deltaTime) + " "); //Input if (window.GetKey(KeyCode.Esc)) { break; } if (player.IsActive) { player.Input(); } //Update PhysicsManager.Update(); UpdateManager.Update(); PhysicsManager.CheckCollisions(); SpawnManager.Update(); //Draw DrawManager.Draw(); window.Update(); } }