コード例 #1
0
 // use when creating
 public TerrainBuilder(int width, int height, int seed)
 {
     Seed          = seed;
     Width         = width;
     Height        = height;
     _presetLoader = new GradiantPresetLoader(GameServer.Instance.AppDirectory + "GradientPresets" + GameServer.sepChar);
     Settings      = new TerrainSettings(width, height, seed, string.Empty, string.Empty, string.Empty);
     Logger.Log("Terrain initialized.");
 }
コード例 #2
0
 // use when creating
 public TerrainBuilder(int width, int height, int seed)
 {
     Seed = seed;
     Width = width;
     Height = height;
     _presetLoader = new GradiantPresetLoader (GameServer.Instance.AppDirectory + "GradientPresets" + GameServer.sepChar);
     Settings = new TerrainSettings (width, height, seed, string.Empty, string.Empty, string.Empty);
     Logger.Log("Terrain initialized.");
 }
コード例 #3
0
 // use when loading
 public TerrainBuilder(TerrainSettings settings)
 {
     Settings       = settings;
     Seed           = settings.seed;
     Width          = settings.width;
     Height         = settings.height;
     NoiseModule    = FileManager.LoadObject <IModule> (settings.moduleFile, true);
     _presetLoader  = new GradiantPresetLoader(GameServer.Instance.AppDirectory + "GradientPresets" + GameServer.sepChar);
     GradientPreset = _presetLoader.GetPreset(settings.preset);
     Gradient       = GradientCreator.CreateGradientServer(new List <GradientPresets.GradientKeyData>(GradientPreset));
     LoadMap(settings.imageFile);
 }
コード例 #4
0
 // use when loading
 public TerrainBuilder(TerrainSettings settings)
 {
     Settings = settings;
     Seed = settings.seed;
     Width = settings.width;
     Height = settings.height;
     NoiseModule = FileManager.LoadObject<IModule> (settings.moduleFile, true);
     _presetLoader = new GradiantPresetLoader (GameServer.Instance.AppDirectory + "GradientPresets" + GameServer.sepChar);
     GradientPreset = _presetLoader.GetPreset (settings.preset);
     Gradient = GradientCreator.CreateGradientServer (new List<GradientPresets.GradientKeyData>(GradientPreset));
     LoadMap (settings.imageFile);
 }