Example #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
 public void Draw(SpriteBatch spriteBatch, Game1 game)
 {
     if (texture != null)
     {
         spriteBatch.Draw(texture, position, Color.White);
         spriteBatch.DrawString(game.font, "" + name, new Vector2(position.X, position.Y - 20), Color.Red);
     }
 }
Example #3
0
        static void Main(string[] args)
        {
            DialogResult res = MessageBox.Show("Vil du åpne spillet i redigeringsmodus?", "Velg modus", MessageBoxButtons.YesNo);
            if (res == DialogResult.Yes)
            {
                MainForm form = new MainForm();
                form.Show();
                form.game = new EditorGame(form.pctSurface.Handle, form, form.pctSurface);
                form.game.Run();
            }

            else
            {
                using (Game1 game = new Game1())
                {
                    game.Run();
                }

            }
        }