コード例 #1
0
        public TerrainGeneratorConfiguration(ParseBlock Block)
        {
            var attributes = Block.BreakToAttributes <object>(typeof(Attribute), true);

            UniqueKey          = Block.Name;
            ElevationGenerator = (FeatureGenerator)attributes[(int)Attribute.ELEVATION_GENERATOR];
            WaterGenerator     = (FeatureGenerator)attributes[(int)Attribute.WATER_GENERATOR];
            SwampGenerator     = (FeatureGenerator)attributes[(int)Attribute.SWAMP_GENERATOR];
            ForestGenerator    = (FeatureGenerator)attributes[(int)Attribute.FOREST_GENERATOR];
            TownGenerator      = (FeatureGenerator)attributes[(int)Attribute.TOWN_GENERATOR];
        }
コード例 #2
0
 public TerrainGeneratorConfiguration(
     string UniqueKey,
     FeatureGenerator ElevationGenerator,
     FeatureGenerator WaterGenerator,
     FeatureGenerator SwampGenerator,
     FeatureGenerator ForestGenerator,
     FeatureGenerator TownGenerator)
 {
     this.UniqueKey          = UniqueKey;
     this.ElevationGenerator = ElevationGenerator;
     this.WaterGenerator     = WaterGenerator;
     this.SwampGenerator     = SwampGenerator;
     this.ForestGenerator    = ForestGenerator;
     this.TownGenerator      = TownGenerator;
 }