public Menu(GameEngine engine) { _engine = engine; _isGameStart = false; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here IsMouseVisible = true; gameengine = new GameEngine(); menu = new Menu(gameengine); base.Initialize(); }
/// <summary> /// Instantiates game engine and form controls /// </summary> public Form1() { InitializeComponent(); gameEngine = new GameEngine(ClientSize); }
/// <summary> /// Invoked when the Restart button is clicked /// </summary> /// <param name="sender">object that invoked this event</param> /// <param name="e">event data</param> private void restartToolStripMenuItem_Click(object sender, EventArgs e) { gameEngine = new GameEngine(ClientSize); Refresh(); }