Example #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Example #2
0
File: HUD.cs Project: hmaon/cmsc325
        public HUD(Game game, SpriteFont font)
            : base(game)
        {
            // TODO: Construct any child components here

            this.game = game as Game1;
            fn = font;
        }
Example #3
0
        private char[] separator = { ' ' }; // consts and arrays are bugging me - grr

        #endregion Fields

        #region Constructors

        public Dispatcher(Game game)
            : base(game)
        {
            this.game = (Game1)game; // I guess this might not be conventional style?
            // but game.whatever seems easier than typing ((Game1)Game).whatever all the damn time

            rand = new Random();

            // TODO: Construct any child components here

            // pfft, as if.
        }
Example #4
0
 public SkyBox(Game game)
     : base(game)
 {
     this.game = (Game1)game;
 }
Example #5
0
 public MainMenu(Game game)
     : base(game)
 {
     // TODO: Construct any child components here
     this.game = (Game1)game; // frightening up-cast
 }
Example #6
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            screen = new Stack<gameScreen>(42); // new state stack with more than enough space for all game screens

            Content.RootDirectory = "Content";

            main_instance = this;
        }