public Game(GameEngine engine) { this.engine = engine; GameStateDictionary[State.menu] = new MenuGameState(); GameStateDictionary[State.game] = new InGameState(); //Set the state to the menu state initially CurrentState = State.menu; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Create a new game engine object GameEngine engine = new GameEngine(); //NOTE: The game engine will create a form and display it using the Application.Run() method. //We do this in the game engines constructor beucase we need to add some stuff to the window first. }