Beispiel #1
0
 public Menu(GameEngine engine)
 {
     _engine = engine;
     _isGameStart = false;
 }
Beispiel #2
0
        /// <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();
        }
Beispiel #3
0
 /// <summary>
 /// Instantiates game engine and form controls
 /// </summary>
 public Form1()
 {
     InitializeComponent();
     gameEngine = new GameEngine(ClientSize);
 }
Beispiel #4
0
 /// <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();
 }
 /// <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();
 }