// 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."); }
// 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."); }
// 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); }
// 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); }