public ExodusLocation(Pos p, float[] biomes, ExodusGame game, Dictionary <string, float> qualities)
 {
     _p         = p;
     _biomes    = biomes;
     _game      = game;
     _qualities = qualities;
     mDebug.Log("MakingExodusLocation", false);
 }
    // Start is called before the first frame update
    public void Start()
    {
        IGame _game = new GameBase();

        if (projectName == ProjectName.Exodus)
        {
            _game = new ExodusGame();
        }

        Init(_game);
    }
    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 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);
    }
Beispiel #5
0
 public ExodusKeyHandler(ExodusGame game)
 {
     _game = game;
 }