|
|
|
|
@ -25,7 +25,7 @@ public class PlantLife
@@ -25,7 +25,7 @@ public class PlantLife
|
|
|
|
|
public void Init() |
|
|
|
|
{ |
|
|
|
|
_plantParams = new PlantParams(); |
|
|
|
|
_plantParams.NodeParams.maxToRootAngleRange = Mathf.DegToRad(270); |
|
|
|
|
_plantParams.NodeParams.maxToRootAngleRange = Mathf.DegToRad(200); |
|
|
|
|
|
|
|
|
|
GenesToPhenes(); |
|
|
|
|
//_plantParams.GrowDirection = Vector2.Right; |
|
|
|
|
@ -42,8 +42,8 @@ public class PlantLife
@@ -42,8 +42,8 @@ public class PlantLife
|
|
|
|
|
_plantParams.AverageChildren = a; |
|
|
|
|
var b = bytes[1]; |
|
|
|
|
|
|
|
|
|
//var c = bytes[2]; |
|
|
|
|
//_plantParams.MaxChildren = c + 1; |
|
|
|
|
var c = bytes[2]; |
|
|
|
|
_plantParams.MaxChildren += 1-c; |
|
|
|
|
|
|
|
|
|
var d = bytes[3]; |
|
|
|
|
|
|
|
|
|
@ -57,7 +57,7 @@ public class PlantLife
@@ -57,7 +57,7 @@ public class PlantLife
|
|
|
|
|
_plantParams.GrowDirection = Vector2.Down; |
|
|
|
|
|
|
|
|
|
//var v = Mathf.LerpAngle(0.5f, 5.8f, (float)d/4); // 0 - 6.2 |
|
|
|
|
var v = Mathf.Lerp(0.5f, 5.8f, (float)d/4); |
|
|
|
|
var v = Mathf.Lerp(0.5f, 3.8f, (float)d/4); |
|
|
|
|
_plantParams.NodeParams.MaxToParentAngleRange = v; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|