/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (MainGame game = new MainGame()) { game.Run(); } }
public TileEngine(int tileWidth, int tileHeight, MainGame game) { TileEngine.tileWidth = tileWidth; TileEngine.tileHeight = tileHeight; viewportWidth = game.Window.ClientBounds.Width; viewportHeight = game.Window.ClientBounds.Height; }
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; }
public void Initialize(MainGame game) { GameRef = game; Camera = new Camera(); TileEngine = new TileEngine(32,32,game); }