public static Dictionary <Pos, ILocation> MakeLocationsForExodusFromMethod(BiomeInitialization biomeInit, ExodusGame game, MapGen mapGen, int numCats) { IMap map = game.map; Dictionary <Pos, ILocation> locations = new Dictionary <Pos, ILocation>(); float[][,] biomes = ExodusBiomeInitializer.GetBiomesFromMethod(map, mapGen, numCats, biomeInit); Color[] colorList = Colors.ColorListProcedural(2000); for (int x = 0; x < map.xDim; x++) { for (int y = 0; y < map.yDim; y++) { Pos p = map.pathMap[new Loc(x, y).key()]; float[] thisBiomes = new float[numCats]; for (int iCat = 0; iCat < numCats; iCat++) { thisBiomes[iCat] = biomes[iCat][x, y]; } Dictionary <string, float> qualities = mapGen.GetLocationQualities(x, y); locations[p] = new ExodusLocation(p, thisBiomes, game, qualities); } } return(locations); }
public Color GetColor(ExodusLocation location, Color currentColor) { Color c = currentColor; switch (_currentColorType) { case ExodusLocationColorType.DiscreteSingle: c = GetColorDiscreteSingleBiome(c, location); break; case ExodusLocationColorType.DiscreteMulti: c = GetColorDiscreteManyBiome(c, location); break; case ExodusLocationColorType.ContinuousSingle: c = GetColorContinuousSingleBiome(c, location); break; case ExodusLocationColorType.ContinuousMulti: c = GetColorContinuousManyBiome(c, location); break; } return(c); }
public Color GetColor(ExodusLocation exodusLocation) { Color c = SetDefaultColor(exodusLocation); c = _biomeSystem.GetColor(exodusLocation, c); return(c); }
private Color GetColorDiscreteSingleBiome(Color currentColor, ExodusLocation location) { if (location._biomes[_currentBiome] > ExodusSettings.biomeCutoffDiscrete) { currentColor = _biomeColors[_currentBiome]; } return(currentColor); }
private Color GetColorContinuousSingleBiome(Color currentColor, ExodusLocation location) { if (location._biomes[_currentBiome] > ExodusSettings.biomeCutoffContinuous) { Color pureColor = _biomeColors[_currentBiome]; currentColor = MapColor.GetColorLerp(location._biomes[_currentBiome], Color.white, pureColor); } return(currentColor); }
private Color GetColorDiscreteManyBiome(Color currentColor, ExodusLocation location) { int maxIndex = location.GetMaxBiome(); if (location._biomes[maxIndex] > ExodusSettings.biomeCutoffDiscrete) { currentColor = _biomeColors[maxIndex]; } return(currentColor); }
private Color GetColorContinuousManyBiome(Color currentColor, ExodusLocation location) { int maxIndex = location.GetMaxBiome(); if (location._biomes[maxIndex] > ExodusSettings.biomeCutoffContinuous) { Color pureColor = _biomeColors[maxIndex]; currentColor = MapColor.GetColorLerp(location._biomes[maxIndex], Color.white, pureColor); } return(currentColor); }
private Color SetDefaultColor(ExodusLocation location) { Color c = Color.magenta; if (location._qualities["Land"] == 0f) { c = Color.black; } else { c = Color.white; } return(c); }
public static Dictionary <Pos, ILocation> MakeLocationsForExodus(ExodusGame game, MapGen mapGen, int numCats, float cutoff = 0.9f) { IMap map = game.map; Dictionary <Pos, ILocation> locations = new Dictionary <Pos, ILocation>(); for (int x = 0; x < map.xDim; x++) { for (int y = 0; y < map.yDim; y++) { Pos p = map.pathMap[new Loc(x, y).key()]; Dictionary <string, float> qualities = mapGen.GetLocationQualities(x, y); locations[p] = new ExodusLocation(p, new float[numCats], game, qualities); } } return(locations); }
public ExodusStructure(ExodusLocation location) { _location = location; Debug.Log("Made New Structure"); }