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); }
public PlayField(int w, int h, Camera2D inCam) { this.width = w; this.height = h; this.cam = inCam; Init(); }
/// <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); }