// Load content public override void LoadContent(ContentManager content) { base.LoadContent(content); // Test save meme if (Directory.Exists("Save")) { tileMaps = GameFileManager.LoadTileMapArray("Save/Map", this, new Point(20, 20), new Vector2(0, 64)); for (int i = 0; i < tileMaps.Length; i++) { tileMaps[i].LoadContent(Content); } } else { for (int y = 0; y < 20; y++) { for (int x = 0; x < 20; x++) { TileMap tm = GameFileManager.LoadTileMap(this, TileMap.TileMapsRight[0], new Vector2(0 + MainGame.TILE_SIZE.X * 8 * x, 64 + MainGame.TILE_SIZE.Y * 8 * y)); tileMaps[y * 20 + x] = tm; tm.LoadContent(Content); } } } player = new PlayerObject(this); AddGameObject(player); ScreenBackground Background1 = new ScreenBackground(); Background1.LoadContent(content, "dirt_background"); ScreenBackgrounds.Add(Background1); Enemy npc = new Enemy(this); AddGameObject(npc); npc.Position.X = 200; npc.Position.Y = -100; threadRunning = true; LoadThread.Start(); }
public Texture2D this[ScreenBackgrounds index] { get { return(_screenTextures[index]); } }