[otwarty teren] wydzielenie generowania ze skryptow unity part 2
This commit is contained in:
parent
7827f6cc21
commit
3c3cbc995b
@ -1,9 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Assets.Common;
|
|
||||||
using Assets.Voronoi;
|
using Assets.Voronoi;
|
||||||
|
|
||||||
namespace Assets.Map
|
namespace Assets.Common
|
||||||
{
|
{
|
||||||
public class Location
|
public class Location
|
||||||
{
|
{
|
||||||
@ -37,15 +36,4 @@ namespace Assets.Map
|
|||||||
BoundaryEdges = a.Union(b).Except(a.Intersect(b)).ToList();
|
BoundaryEdges = a.Union(b).Except(a.Intersect(b)).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LocationSite
|
|
||||||
{
|
|
||||||
public readonly Site Site;
|
|
||||||
public Location Location;
|
|
||||||
|
|
||||||
public LocationSite(Site site)
|
|
||||||
{
|
|
||||||
Site = site;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
3
Assets/Common/Location.cs.meta
Normal file
3
Assets/Common/Location.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: def8cfa113744a3bb21d99fddf782916
|
||||||
|
timeCreated: 1573304795
|
@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Assets.Common;
|
|
||||||
using Assets.Voronoi;
|
using Assets.Voronoi;
|
||||||
using Random = System.Random;
|
using Random = System.Random;
|
||||||
|
|
||||||
namespace Assets.Map
|
namespace Assets.Common
|
||||||
{
|
{
|
||||||
public class LocationGenerator
|
public class LocationGenerator
|
||||||
{
|
{
|
3
Assets/Common/LocationGenerator.cs.meta
Normal file
3
Assets/Common/LocationGenerator.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1a667fae02f346199ad742a83f9d8610
|
||||||
|
timeCreated: 1573304795
|
15
Assets/Common/LocationSite.cs
Normal file
15
Assets/Common/LocationSite.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using Assets.Voronoi;
|
||||||
|
|
||||||
|
namespace Assets.Common
|
||||||
|
{
|
||||||
|
public class LocationSite
|
||||||
|
{
|
||||||
|
public readonly Site Site;
|
||||||
|
public Location Location;
|
||||||
|
|
||||||
|
public LocationSite(Site site)
|
||||||
|
{
|
||||||
|
Site = site;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Assets/Common/LocationSite.cs.meta
Normal file
3
Assets/Common/LocationSite.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ae1606ff46e64c2a9dc080c61bbd74b8
|
||||||
|
timeCreated: 1573304795
|
@ -1,8 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Assets.Common;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Assets.Map
|
namespace Assets.Common
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Map
|
public class Map
|
||||||
@ -31,13 +30,4 @@ namespace Assets.Map
|
|||||||
Seed = seed;
|
Seed = seed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
|
||||||
public class MapSite
|
|
||||||
{
|
|
||||||
public readonly Metadata Metadata = new Metadata();
|
|
||||||
|
|
||||||
[field: NonSerialized]
|
|
||||||
public Map Map { get; internal set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
3
Assets/Common/Map.cs.meta
Normal file
3
Assets/Common/Map.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 087a8dc14fe944dfa2bef7a5fbaefc3d
|
||||||
|
timeCreated: 1573304795
|
13
Assets/Common/MapSite.cs
Normal file
13
Assets/Common/MapSite.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Assets.Common
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class MapSite
|
||||||
|
{
|
||||||
|
public readonly Metadata Metadata = new Metadata();
|
||||||
|
|
||||||
|
[field: NonSerialized]
|
||||||
|
public Map Map { get; internal set; }
|
||||||
|
}
|
||||||
|
}
|
3
Assets/Common/MapSite.cs.meta
Normal file
3
Assets/Common/MapSite.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1bff83ade11b42e49fce3ba4f779b5d2
|
||||||
|
timeCreated: 1573304795
|
@ -6,7 +6,7 @@ using Random = UnityEngine.Random;
|
|||||||
|
|
||||||
namespace Editor
|
namespace Editor
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof (GraphGenerator))]
|
[CustomEditor(typeof (LandmassGenerator))]
|
||||||
public class GraphGeneratorUI : UnityEditor.Editor
|
public class GraphGeneratorUI : UnityEditor.Editor
|
||||||
{
|
{
|
||||||
private string _threshold;
|
private string _threshold;
|
||||||
@ -14,7 +14,7 @@ namespace Editor
|
|||||||
|
|
||||||
public override void OnInspectorGUI()
|
public override void OnInspectorGUI()
|
||||||
{
|
{
|
||||||
GraphGenerator generator = (GraphGenerator)target;
|
LandmassGenerator generator = (LandmassGenerator)target;
|
||||||
|
|
||||||
_showInfo = EditorGUILayout.Foldout(_showInfo, "Debug info");
|
_showInfo = EditorGUILayout.Foldout(_showInfo, "Debug info");
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ namespace Editor
|
|||||||
|
|
||||||
private void OnSceneGUI()
|
private void OnSceneGUI()
|
||||||
{
|
{
|
||||||
GraphGenerator generator = (GraphGenerator)target;
|
LandmassGenerator generator = (LandmassGenerator)target;
|
||||||
|
|
||||||
if (generator.VoronoiGenerator != null)
|
if (generator.VoronoiGenerator != null)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 259153a10cc9545dbb826a5a4c315254
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,9 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Generators
|
|
||||||
{
|
|
||||||
public interface IGenerator
|
|
||||||
{
|
|
||||||
double GetValue(Vector2 position);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 682b56d4654bea3de8b383036947492f
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,29 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Generators
|
|
||||||
{
|
|
||||||
public class IslandGenerator : IGenerator
|
|
||||||
{
|
|
||||||
private IGenerator noise;
|
|
||||||
|
|
||||||
public float Inner { get; set; } = 20;
|
|
||||||
public float Outer { get; set; } = 23;
|
|
||||||
|
|
||||||
public float Threshold { get; set; } = .5f;
|
|
||||||
|
|
||||||
public IslandGenerator(IGenerator noise)
|
|
||||||
{
|
|
||||||
this.noise = noise;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double GetValue(Vector2 position)
|
|
||||||
{
|
|
||||||
var distance = position.magnitude / 10;
|
|
||||||
distance = (distance - Inner) / (Outer - Inner);
|
|
||||||
|
|
||||||
var result = noise.GetValue(position) + .75 * (Mathf.Clamp(0, distance, 1) - 1);
|
|
||||||
|
|
||||||
return result > Threshold ? 1 : 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Generators
|
|
||||||
{
|
|
||||||
public class PerlinNoiseGenerator : IGenerator
|
|
||||||
{
|
|
||||||
public float Scale { get; set; } = 0.001f;
|
|
||||||
public Vector2 Offset { get; set; } = new Vector2(.0f, .0f);
|
|
||||||
public int Iterations { get; set; } = 8;
|
|
||||||
public float Decay { get; set; } = .7f;
|
|
||||||
public float Lacunarity { get; set; } = 1.71f;
|
|
||||||
|
|
||||||
public double GetValue(Vector2 position)
|
|
||||||
{
|
|
||||||
var amplitude = 1.0;
|
|
||||||
var scale = Scale;
|
|
||||||
var result = 0.0;
|
|
||||||
|
|
||||||
for (int i = 0; i < Iterations; i++) {
|
|
||||||
result += amplitude * Calculate(position, scale);
|
|
||||||
|
|
||||||
amplitude *= Decay;
|
|
||||||
scale *= Lacunarity;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result / ((1 - System.Math.Pow(Decay, Iterations)) / (1 - Decay));
|
|
||||||
}
|
|
||||||
|
|
||||||
private double Calculate(Vector2 position, float scale)
|
|
||||||
{
|
|
||||||
var final = (position + Offset) * scale;
|
|
||||||
|
|
||||||
return Mathf.PerlinNoise(final.x, final.y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 80853afcc172aecd3bc2885e9c1f4705
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b2de5bc0563442539a60e5a00687d27d
|
|
||||||
timeCreated: 1564082962
|
|
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c1829eb593684199a5177fd08c07a753
|
|
||||||
timeCreated: 1564083223
|
|
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 7a2d1705444344bfa99efc3c210db6f4
|
|
||||||
timeCreated: 1564324021
|
|
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: d1d1ebae421749529153eedaa70e227b
|
|
||||||
timeCreated: 1564082971
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 3d8829ac873af27488b1412b8db301ab
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,11 +1,8 @@
|
|||||||
using Assets.Common;
|
using Assets.Common;
|
||||||
using Assets.Map;
|
|
||||||
using Assets.Voronoi;
|
using Assets.Voronoi;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Assets.Scripts
|
namespace Assets.Scripts
|
||||||
@ -100,7 +97,7 @@ namespace Assets.Scripts
|
|||||||
public bool displayWorldRoads = false;
|
public bool displayWorldRoads = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[RequireComponent(typeof(GraphGenerator))]
|
[RequireComponent(typeof(LandmassGenerator))]
|
||||||
public class CityGenerator : MonoBehaviour
|
public class CityGenerator : MonoBehaviour
|
||||||
{
|
{
|
||||||
private System.Random _random;
|
private System.Random _random;
|
||||||
@ -185,8 +182,7 @@ namespace Assets.Scripts
|
|||||||
{
|
{
|
||||||
var randomLocation = _locationGraph.Vertices[_random.Next(1, _locationGraph.Vertices.Count())];
|
var randomLocation = _locationGraph.Vertices[_random.Next(1, _locationGraph.Vertices.Count())];
|
||||||
var count = randomLocation.Sites.Count();
|
var count = randomLocation.Sites.Count();
|
||||||
Site randomPoint;
|
var randomPoint = randomLocation.Sites[_random.Next(0, count)];
|
||||||
randomPoint = randomLocation.Sites[_random.Next(0, count)];
|
|
||||||
vertices.Add(randomPoint.Index);
|
vertices.Add(randomPoint.Index);
|
||||||
}
|
}
|
||||||
return vertices;
|
return vertices;
|
||||||
@ -309,7 +305,7 @@ namespace Assets.Scripts
|
|||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
|
|
||||||
var graphGenerator = GetComponent<GraphGenerator>();
|
var graphGenerator = GetComponent<LandmassGenerator>();
|
||||||
_random = new System.Random(graphGenerator.seed);
|
_random = new System.Random(graphGenerator.seed);
|
||||||
cities = new List<City>();
|
cities = new List<City>();
|
||||||
}
|
}
|
||||||
@ -321,7 +317,7 @@ namespace Assets.Scripts
|
|||||||
|
|
||||||
public void Generate()
|
public void Generate()
|
||||||
{
|
{
|
||||||
var graphGenerator = GetComponent<GraphGenerator>();
|
var graphGenerator = GetComponent<LandmassGenerator>();
|
||||||
graphGenerator.Generate();
|
graphGenerator.Generate();
|
||||||
_basicGraph = graphGenerator.VoronoiGenerator.Delaunay.Morph(l => l);
|
_basicGraph = graphGenerator.VoronoiGenerator.Delaunay.Morph(l => l);
|
||||||
_voronoiGraph = graphGenerator.VoronoiGenerator.Voronoi;
|
_voronoiGraph = graphGenerator.VoronoiGenerator.Voronoi;
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Assets.Common;
|
using Assets.Common;
|
||||||
using Assets.Generators;
|
using Assets.PointDistribution;
|
||||||
using Assets.Map;
|
|
||||||
using Assets.Voronoi;
|
using Assets.Voronoi;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = System.Random;
|
using Random = System.Random;
|
||||||
@ -11,7 +10,7 @@ namespace Assets
|
|||||||
{
|
{
|
||||||
[RequireComponent(typeof(MeshFilter))]
|
[RequireComponent(typeof(MeshFilter))]
|
||||||
[RequireComponent(typeof(MeshRenderer))]
|
[RequireComponent(typeof(MeshRenderer))]
|
||||||
[RequireComponent(typeof(GraphGenerator))]
|
[RequireComponent(typeof(LandmassGenerator))]
|
||||||
public class ForestGenerator : MonoBehaviour
|
public class ForestGenerator : MonoBehaviour
|
||||||
{
|
{
|
||||||
public GameObject[] trees;
|
public GameObject[] trees;
|
||||||
@ -22,7 +21,7 @@ namespace Assets
|
|||||||
private Random _random = new Random();
|
private Random _random = new Random();
|
||||||
private List<Site> _sites;
|
private List<Site> _sites;
|
||||||
|
|
||||||
private GraphGenerator Generator => GetComponent<GraphGenerator>();
|
private LandmassGenerator Generator => GetComponent<LandmassGenerator>();
|
||||||
|
|
||||||
public void Generate()
|
public void Generate()
|
||||||
{
|
{
|
||||||
|
@ -3,8 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Assets.Common;
|
using Assets.Common;
|
||||||
using Assets.Generators;
|
using Assets.PointDistribution;
|
||||||
using Assets.Map;
|
|
||||||
using Assets.Voronoi;
|
using Assets.Voronoi;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -50,7 +49,7 @@ namespace Assets
|
|||||||
};
|
};
|
||||||
|
|
||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
public class GraphGenerator : MonoBehaviour
|
public class LandmassGenerator : MonoBehaviour
|
||||||
{
|
{
|
||||||
private PoissonDiskSampler _sampler;
|
private PoissonDiskSampler _sampler;
|
||||||
private Random _random;
|
private Random _random;
|
||||||
@ -88,7 +87,7 @@ namespace Assets
|
|||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
_random = new System.Random(seed);
|
_random = new Random(seed);
|
||||||
|
|
||||||
_sampler = new PoissonDiskSampler(radius);
|
_sampler = new PoissonDiskSampler(radius);
|
||||||
_sampler.Generator = _random;
|
_sampler.Generator = _random;
|
@ -1,8 +1,6 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Assets.Common;
|
using Assets.Common;
|
||||||
using Assets.Map;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
@ -10,7 +8,7 @@ namespace Assets
|
|||||||
{
|
{
|
||||||
[RequireComponent(typeof(MeshFilter))]
|
[RequireComponent(typeof(MeshFilter))]
|
||||||
[RequireComponent(typeof(MeshRenderer))]
|
[RequireComponent(typeof(MeshRenderer))]
|
||||||
[RequireComponent(typeof(GraphGenerator))]
|
[RequireComponent(typeof(LandmassGenerator))]
|
||||||
public class MapRenderer : MonoBehaviour
|
public class MapRenderer : MonoBehaviour
|
||||||
{
|
{
|
||||||
public float UVScale = 1.0f;
|
public float UVScale = 1.0f;
|
||||||
@ -25,7 +23,7 @@ namespace Assets
|
|||||||
|
|
||||||
public void Generate()
|
public void Generate()
|
||||||
{
|
{
|
||||||
var graph = GetComponent<GraphGenerator>();
|
var graph = GetComponent<LandmassGenerator>();
|
||||||
|
|
||||||
graph.Reset();
|
graph.Reset();
|
||||||
graph.Generate();
|
graph.Generate();
|
||||||
@ -179,7 +177,7 @@ namespace Assets
|
|||||||
|
|
||||||
private void OnDrawGizmos()
|
private void OnDrawGizmos()
|
||||||
{
|
{
|
||||||
var graph = GetComponent<GraphGenerator>();
|
var graph = GetComponent<LandmassGenerator>();
|
||||||
|
|
||||||
if (graph?.LocationGenerator?.Result == null) return;
|
if (graph?.LocationGenerator?.Result == null) return;
|
||||||
|
|
||||||
|
3
Assets/Scripts/PointDistribution.meta
Normal file
3
Assets/Scripts/PointDistribution.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 72849a31bf1649faa230ac49f1df4d57
|
||||||
|
timeCreated: 1573303680
|
10
Assets/Scripts/PointDistribution/IPointDistribution.cs
Normal file
10
Assets/Scripts/PointDistribution/IPointDistribution.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Assets.Common;
|
||||||
|
|
||||||
|
namespace Assets.PointDistribution
|
||||||
|
{
|
||||||
|
public interface IPointDistribution
|
||||||
|
{
|
||||||
|
IEnumerable<Point> Generate(float width, float height);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 05c83e14e4294176bfcbac0e8b8f1018
|
||||||
|
timeCreated: 1573303566
|
@ -4,9 +4,9 @@ using System.Linq;
|
|||||||
using Assets.Common;
|
using Assets.Common;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Assets.Generators
|
namespace Assets.PointDistribution
|
||||||
{
|
{
|
||||||
public class PoissonDiskSampler
|
public class PoissonDiskSampler : IPointDistribution
|
||||||
{
|
{
|
||||||
public System.Random Generator { get; set; } = new System.Random();
|
public System.Random Generator { get; set; } = new System.Random();
|
||||||
|
|
||||||
@ -53,11 +53,11 @@ namespace Assets.Generators
|
|||||||
var x = (int)Math.Floor(point.x / size);
|
var x = (int)Math.Floor(point.x / size);
|
||||||
var y = (int)Math.Floor(point.y / size);
|
var y = (int)Math.Floor(point.y / size);
|
||||||
|
|
||||||
var neighbours = (new List<(int, int)>() {
|
var neighbours = new List<(int, int)> {
|
||||||
(x - 1, y + 1), (x, y + 1), (x + 1, y + 1),
|
(x - 1, y + 1), (x, y + 1), (x + 1, y + 1),
|
||||||
(x - 1, y), (x, y), (x + 1, y),
|
(x - 1, y), (x, y), (x + 1, y),
|
||||||
(x - 1, y - 1), (x, y - 1), (x + 1, y - 1)
|
(x - 1, y - 1), (x, y - 1), (x + 1, y - 1)
|
||||||
});
|
};
|
||||||
|
|
||||||
return neighbours
|
return neighbours
|
||||||
.Where(p => grid.ContainsKey(p))
|
.Where(p => grid.ContainsKey(p))
|
10
Assets/Tools/TikzExporter.cs
Normal file
10
Assets/Tools/TikzExporter.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace Assets.Tools
|
||||||
|
{
|
||||||
|
public class TikzGenerator
|
||||||
|
{
|
||||||
|
public static void Main()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: bbd6867fa0c423e078e554a9835c397f
|
guid: 3517404de0c3a15dd8b56257c07ac43a
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
@ -1,7 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Assets.Common;
|
using Assets.Common;
|
||||||
using Assets.Map;
|
|
||||||
using Priority_Queue;
|
using Priority_Queue;
|
||||||
|
|
||||||
namespace Assets.Voronoi
|
namespace Assets.Voronoi
|
||||||
|
Loading…
Reference in New Issue
Block a user