/// <summary> /// Adds the floor. /// </summary> public void AddFloor() { if (floors.Count < 5) { Floor floor = new Floor(); floor.Initialize(floorWidth, floorHeight, Tile.TileType.Empty); floors.Add(floor); SelectFloor(floors.Count - 1); SetEvents(); OnFloorAdded(floor, EventArgs.Empty); } }
/// <summary> /// Selects the top floor. /// </summary> public void SelectTopFloor() { Floor topFloor = new Floor(); topFloor.Initialize(floorWidth, floorHeight, Tile.TileType.Empty); for (int y = 0; y < floorHeight; y++) { for (int x = 0; x < floorWidth; x++) { topFloor.SetTile(x, y, GetTopTile(x, y)); } } selectedFloor = topFloor; floorID = -1; OnSceneChanged(this, EventArgs.Empty); }