public Main([NotNull] LandLayout landLayout) { if (landLayout == null) { throw new ArgumentNullException("landLayout"); } LandLayout = landLayout; }
public void GenerateLayout([NotNull] LandLayout landLayout) { if (landLayout == null) { throw new ArgumentNullException("landLayout"); } //Empty for now LandLayout = landLayout; }
void OnEnable() { if (Application.isPlaying) { _target = (Runner)target; _main = _target.Main; _layout = _main.LandLayout; _self = this; } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); if (Application.isPlaying && _target != null) { if (GUILayout.Button("Rebuild land")) { _target.BuildAll(); _layout = _main.LandLayout; } if (GUILayout.Button("Create map")) { var map = _main.GenerateMap(_target); _target.MeshAndVisualize(map); } } }
protected ZoneGenerator(ZoneLayout zone, [NotNull] LandLayout land, [NotNull] ILandSettings landSettings) { if (land == null) { throw new ArgumentNullException("land"); } if (landSettings == null) { throw new ArgumentNullException("landSettings"); } _zone = zone; Land = land; _landSettings = landSettings; _blocksCount = landSettings.BlocksCount; _blockSize = landSettings.BlockSize; _chunkSize = _blocksCount * _blockSize; _zoneMaxType = landSettings.ZoneTypes.Max(z => z.Type); DefaultBlock = landSettings.ZoneTypes.First(z => z.Type == zone.Type).DefaultBlock; }
public LakeGenerator(ZoneLayout zone, LandLayout land, ILandSettings landSettings) : base(zone, land, landSettings) { }
public ConeGenerator(ZoneLayout zone, [NotNull] LandLayout land, [NotNull] ILandSettings landSettings) : base(zone, land, landSettings) { }
public LandMap(ILandSettings settings, LandLayout layout) { _settings = settings; Layout = layout; }
public LandGenerator(LandLayout land, ILandSettings settings) { _land = land; _settings = settings; }
public MountainsGenerator(ZoneLayout zone, LandLayout land, ILandSettings landSettings) : base(zone, land, landSettings) { }