Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using HexagonSurvive.Map.Properties;
- using HexagonSurvive.Map.Settings;
- using Unity.Collections;
- using Unity.Entities;
- using Unity.Mathematics;
- namespace HexagonSurvive.Map.Components
- {
- [ChunkSerializable]
- public struct HexMapData : IComponentData
- {
- public MapBasicProperties basicProp;
- public TerrainNoiseProperties tnProp;
- public BiomeNoiseProperties bnProp;
- public NativeHashMap<int3, Entity> units;
- public HexMapData(MapBasicSettings basicSettings, TerrainNoiseSettings tnSettings, BiomeNoiseSettings bnSettings)
- {
- basicProp.seed = basicSettings.seed;
- basicProp.mapRadius = basicSettings.mapRadius;
- basicProp.chunkRadius = basicSettings.chunkRadius;
- basicProp.position = basicSettings.position;
- tnProp.terrainSteps = tnSettings.terrainSteps;
- tnProp.altitudePerStep = tnSettings.altitudePerStep;
- tnProp.stepHeight = tnSettings.stepHeight;
- tnProp.baseHeight = tnSettings.baseHeight;
- tnProp.seaLevel = tnSettings.seaLevel;
- tnProp.snowLine = tnSettings.snowLine;
- tnProp.altitudeMultiplier = tnSettings.altitudeMultiplier;
- tnProp.baseTerrain = tnSettings.baseTerrain;
- tnProp.ridged = tnSettings.ridged;
- tnProp.river = tnSettings.river;
- bnProp.treeDensity = bnSettings.treeDensity;
- bnProp.treeSpawnThreshold = bnSettings.treeSpawnThreshold;
- bnProp.treeNoise = bnSettings.treeNoise;
- units = new NativeHashMap<int3, Entity>();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement