Ejemplo n.º 1
0
        public Colony(string name, TileManager.MapData mapData)
        {
            this.name    = name;
            this.mapData = mapData;

            lastSaveDateTime  = PersistenceManager.GenerateSaveDateTimeString();
            lastSaveTimeChunk = PersistenceManager.GenerateDateTimeString();
        }
Ejemplo n.º 2
0
        public Planet(string name, TileManager.MapData mapData) : base(mapData)
        {
            this.name = name;

            planetTiles = new List <PlanetTile>();
            foreach (TileManager.Tile tile in tiles)
            {
                planetTiles.Add(new PlanetTile(this, tile));
            }

            regenerationCode = string.Format(
                "{0}{1}{2}{3}{4}{5}",
                mapData.mapSeed.ToString().PadLeft(20, '0'),
                mapData.mapSize.ToString().PadLeft(3, '0'),
                mapData.planetDistance.ToString().PadLeft(2, '0'),
                mapData.temperatureRange.ToString().PadLeft(3, '0'),
                mapData.randomOffsets ? "1" : "0",
                mapData.primaryWindDirection.ToString().PadLeft(2, '0')
                );

            lastSaveDateTime  = PersistenceManager.GenerateSaveDateTimeString();
            lastSaveTimeChunk = PersistenceManager.GenerateDateTimeString();
        }