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); }
private void OnWorldGenerated(MapGenerator.Containers.Container map, List <CelestialBodyIdentifier[]> warpJumps) { Debug.Log("Genesis Duration = " + (Time.realtimeSinceStartup - TimeStamp) + " seconds"); CreateMap(map, warpJumps); SaveMap(); DisplayMap(); }
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); } }