public clsWindow(GraphicsDeviceManager graphics, Vector2 size, clsRoadWorld world) { this.graphics = graphics; this.size = size; this.graphics.PreferredBackBufferWidth = (int)size.X; // set this value to the desired width of your window this.graphics.PreferredBackBufferHeight = (int)size.Y; // set this value to the desired height of your window this.graphics.ApplyChanges(); // create cameras cameras = new List <clsCamera>(); clsCamera screenCamera = new clsCamera(world, new Vector2(896, 896), new Vector2(800, 800), true); cameras.Add(screenCamera); clsCamera birdsEyeCamera = new clsCamera(world, new Vector2(896, 896), new Vector2(1700, 1700)); cameras.Add(birdsEyeCamera); // create displays displays = new List <clsDisplay>(); clsDisplay display = new clsDisplay(new Rectangle(200, 25, 800, 800), screenCamera, textures, fonts); displays.Add(display); display = new clsDisplay(new Rectangle(1100, 30, 250, 250), birdsEyeCamera, textures, fonts); displays.Add(display); }
public clsCamera(clsRoadWorld world, Vector2 target, Vector2 size, bool inputControled = false) { this.world = world; this.target = target; this.size = size; this.inputControled = inputControled; }
public clsGame() { this.IsMouseVisible = true; roadWorld = new clsRoadWorld(28, 64); // 64 pixels is 15 feet window = new clsWindow(new GraphicsDeviceManager(this), new Vector2(1536, 1024), roadWorld); }