private void InitShaper() { var shaperData = new BiomShaperData(); shaperData.GrowthSpeed = GrowthCoeficient; shaperData.Owner = this; shaperData.Padding = Padding; shaperData.Plane = Plane; _shaper = new BiomShaper(shaperData); _biomeComponents.Add(_shaper); }
public BiomShaper(BiomShaperData data) { _plane = data.Plane; _owner = data.Owner; _surfaceFilter = data.Owner.Surface.GetComponent <MeshRenderer> (); _selfCollider = _plane.GetComponent <MeshCollider> (); _planeMeshFinter = _plane.GetComponent <MeshFilter> (); _selfMapLength = Mathf.Sqrt(_planeMeshFinter.mesh.vertices.Length); _mapGeneratorInstance = GameObject.FindObjectOfType <MapGenerator> (); Padding = data.Padding; GrowthSpeed = data.GrowthSpeed; }