public GameState(int w, int h) { this.width = w; this.height = h; cam = new Camera2D(WoAGame.GetGraphicsDevice.Viewport); cam.Limits = new Rectangle(0, 0, w, h); field = new PlayField(w, h, cam); }
/// <summary> /// This method is a setter for the playfield. It will allow the /// entity to access the playfield internally /// </summary> /// <param name="currentPlayField">The current playfield</param> public void SetPlayField(PlayField currentPlayField) { this.playField = currentPlayField; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); cam2D = new Camera2D(GraphicsDevice.Viewport); cam2D.Limits = new Rectangle(0, 0, 25000, 25000); playField = new PlayField(25000, 25000, cam2D); }