示例#1
0
    private void CreateMap(MapGenerator.Containers.Container map, List <CelestialBodyIdentifier[]> warpJumps)
    {
        if (MapSize == CelestialBodyType.Universe)
        {
            Map = new CelestialBodies.Universe((MapGenerator.Containers.Universe)map);
        }
        else if (MapSize == CelestialBodyType.Expanse)
        {
            Map = new CelestialBodies.Expanse((MapGenerator.Containers.Expanse)map);
        }
        else if (MapSize == CelestialBodyType.Galaxy)
        {
            Map = new CelestialBodies.Galaxy((MapGenerator.Containers.Galaxy)map);
        }
        else if (MapSize == CelestialBodyType.Sector)
        {
            Map = new CelestialBodies.Sector((MapGenerator.Containers.Sector)map);
        }
        else if (MapSize == CelestialBodyType.SolarSystem)
        {
            Map = new CelestialBodies.SolarSystem((MapGenerator.Containers.SolarSystem)map);
        }

        Network = new Network(warpJumps, Map);
    }
示例#2
0
    private void OnWorldGenerated(MapGenerator.Containers.Container map, List <CelestialBodyIdentifier[]> warpJumps)
    {
        Debug.Log("Genesis Duration = " + (Time.realtimeSinceStartup - TimeStamp) + " seconds");

        CreateMap(map, warpJumps);
        SaveMap();
        DisplayMap();
    }
示例#3
0
 private void PreInitializeMap(CelestialBodyType size, int seed)
 {
     if (size == CelestialBodyType.Universe)
     {
         Map = new Containers.Universe(new CelestialBodyIdentifier(size), seed, true);
     }
     else if (size == CelestialBodyType.Expanse)
     {
         Map = new Containers.Expanse(new CelestialBodyIdentifier(size), seed, true);
     }
     else if (size == CelestialBodyType.Galaxy)
     {
         Map = new Containers.Galaxy(new CelestialBodyIdentifier(size), seed, true);
     }
     else if (size == CelestialBodyType.Sector)
     {
         Map = new Containers.Sector(new CelestialBodyIdentifier(size), seed, true);
     }
     else
     {
         Map = new Containers.SolarSystem(new CelestialBodyIdentifier(size), seed, true);
     }
 }