public MapCreator(VoxelsDataContainer Data, int Seed = -1) { VoxelsData = Data; WorldSeed = Seed == -1 ? Random.Range(Global.MinSeed, Global.MaxSeed) : Mathf.Clamp(Seed, Global.MinSeed, Global.MaxSeed); NoiseDataSize = Global.WorldSize - 1; }
/// <summary> /// 创建地形数据的数据结构 /// </summary> void CreateVoxelsData() { VoxelsData = new VoxelsDataContainer1Bit(Global.WorldSize, Global.WorldHeight); Global.VoxelsData = VoxelsData; Global.ChunkPerfab = ChunkPerfab; }