/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="Scene"/> class. /// </summary> public Scene() { floors = new List<Floor>(); selectedFloor = new Floor(); }
/// <summary> /// Selects the floor. /// </summary> /// <param name="_id">The _id.</param> public void SelectFloor(int _id) { floorID = _id; selectedFloor = floors[_id]; OnSceneChanged(this, EventArgs.Empty); }