Beispiel #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (MainGame game = new MainGame())
     {
         game.Run();
     }
 }
Beispiel #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;
        }
Beispiel #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;
 }
Beispiel #4
0
 public void Initialize(MainGame game)
 {
     GameRef = game;
     Camera = new Camera();
     TileEngine = new TileEngine(32,32,game);
 }