Пример #1
0
        public Experiments()
        {
            RN = new RoadNetwork();
            RN.BuildNetwork();
            // try loading trips
            TLoader = new TripsLoader(RN);
            TLoader.LoadTrips();

            Options = new ProgressBarOptions
            {
                DisplayTimeInRealTime = false
            };
        }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        terrain = GetComponent <Terrain>();
        size    = terrain.terrainData.size;
        var forestOptions = new FractalOptions(2, 5);
        var townOptions   = new FractalOptions(2, 5);

        InitializeAlphamap();
        BuildFields();
        BuildRoads();
        BuildTerrainTextures(forestOptions);
        BuildTownTextures(townOptions);
        BuildTrees();
        BuildHedges();
        terrain.terrainData.SetAlphamaps(0, 0, alphaMap);
        terrain.Flush();

        TerrainData.initialize(alphaMap);
        RoadNetwork.BuildNetwork();
    }