Exemple #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (MainGame game = new MainGame())
     {
         game.Run();
     }
 }
Exemple #2
0
        public TileEngine(int tileWidth, int tileHeight, MainGame game)
        {
            TileEngine.tileWidth = tileWidth;
            TileEngine.tileHeight = tileHeight;

                viewportWidth = game.Window.ClientBounds.Width;
                viewportHeight = game.Window.ClientBounds.Height;
        }
Exemple #3
0
 public Engine(MainGame gameRef, GraphicsDeviceManager Graphics)
 {
     this.gameRef = gameRef;
     services = new ServiceContainer();
     services.AddService(typeof(IGraphicsDeviceService), Graphics);
     services.AddService(typeof(IGraphicsDeviceManager), Graphics);
     this.graphicsDevice = Graphics.GraphicsDevice;
     content = new IEContentManager(Services);
     spriteBatch = new SpriteBatch(GraphicsDevice);
     this.graphicsDevice = GraphicsDevice;
 }
Exemple #4
0
 public void Initialize(MainGame game)
 {
     GameRef = game;
     Camera = new Camera();
     TileEngine = new TileEngine(32,32,game);
 }