public void SetInstalledFurniture(InstalledFurniture installedFurniture) { if (this.installedFurniture != null) { Debug.LogWarning("Warning: Trying to change installedFurniture without removing existing first."); } this.installedFurniture = installedFurniture; if (BuildModeController.Instance.furnitureTypes.ContainsKey(installedFurniture.GetFurnitureType())) { // If tile is not walkable if (BuildModeController.Instance.furnitureTypes[installedFurniture.GetFurnitureType()].walkable == false) { isWalkable = false; roomType = null; RoomSpriteController.Instance.UpdateRoom(this); } else { isWalkable = true; } } else { isWalkable = true; } FurnitureSpriteController.Instance.UpdateFurniture(this); }
public override string ToString() { return("Tile: (" + x + ", " + y + "); TileType: " + tileType + "; InstalledFurniture: " + installedFurniture?.GetFurnitureType()); }