public Building(BuildingSdo sdo) { if (sdo == null) { return; } Height = sdo.Height; Width = sdo.Width; FloorTiles = new GameObject[Height, Width]; WallTiles = new GameObject[Height, Width]; WallTypeIndex = sdo.WallTypeIndex; FloorTypeIndex = sdo.FloorTypeIndex; _wallTilePrefabs = BuildingPrefabStore.GetWallTileTypeAt(WallTypeIndex); _floorTilePrefabs = BuildingPrefabStore.GetFloorTileTypeAt(FloorTypeIndex); Blueprint = BuildingSdo.ConvertBlueprintForLoading(Height, Width, sdo.Blueprint); Props = BuildingSdo.ConvertPropsForPlaying(Height, Width, sdo.PropSdos); AddedDoorLocations = BuildingSdo.ConvertBlueprintForLoading(Height, Width, sdo.AddedDoorLocations); //todo need room sdo -- maybe Build(); }
private void PickTilePrefabs() { WallTypeIndex = BuildingPrefabStore.GetRandomWallTypeIndex(); _wallTilePrefabs = BuildingPrefabStore.GetWallTileTypeAt(WallTypeIndex); FloorTypeIndex = BuildingPrefabStore.GetRandomFloorTypeIndex(); _floorTilePrefabs = BuildingPrefabStore.GetFloorTileTypeAt(FloorTypeIndex); }