// Loads the next map in the dungeon public void GoDownLevel() { // Unload the old map map.entities.Clear(); // Load a new map map = new Map(map.level + 1, MapType.dungeon, this); // Let everything know about the new map cam.SetPosition(map.GetStairUpLoc()); raycaster.SetMap(map); }
// Runs when the game state starts for the first time public override void Start() { player = new Player(cam); map = new Map(1, MapType.dungeon, this); raycaster.SetMap(map); cam.SetPosition(map.GetStairUpLoc()); player.CreateStartingItems(); AddMessage("You step down into the musty air of the dungeon."); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { background = new RenderTarget2D(GraphicsDevice, 320, 240, 1, SurfaceFormat.Color); playstate.LoadTexture(@"Walls\brick-grey"); playstate.LoadTexture(@"Walls\brick-mossy"); playstate.LoadTexture(@"Walls\brick-bloody"); playstate.LoadTexture(@"Walls\brick-torch"); playstate.LoadTexture(@"Walls\door"); playstate.LoadTexture(@"Walls\door-grate"); playstate.LoadTexture(@"Deco\column"); playstate.LoadTexture(@"Actors\goblin"); playstate.LoadTexture(@"Actors\kobold"); playstate.LoadTexture(@"Actors\rat"); playstate.LoadFont(@"Gebrider"); //map = new Map(1, MapType.dungeon); map = new Map(1, MapType.dungeon); playstate.SetMap(map); raycaster.SetMap(map); cam.SetPosition(map.GetStairUpLoc()); base.LoadContent(); }