Ejemplo n.º 1
0
 /**<summary> Spawn a single object in a random position on collider </summary>*/
 public GameObject Spawn(GameObject spawnObject, Parser.Bounds bounds, Vector3 center, float?minRadius, float maxRadius, float maxHeight, Transform parent)
 {
     return(Spawn(spawnObject, bounds.GetUnityBounds(), center, minRadius.HasValue ? minRadius.Value : 0, maxRadius, maxHeight, parent));
 }
Ejemplo n.º 2
0
 /**<summary> Get maximum amount / count resulting from density and area constraints </summary>*/
 private int MaxAmount(float density, float distance, Parser.Bounds bounds)
 {
     return((int)(density * Mathf.Min(bounds.area, distance * distance * 4)));
 }
Ejemplo n.º 3
0
 /**<summary> Spawn objects in random positions on collider </summary>*/
 public GameObject[] Spawn(GameObject spawnObject, Parser.Bounds bounds, float minRadius, int count, float maxHeight, Transform parent)
 {
     return(Spawn(spawnObject, bounds, Vector3.zero, minRadius, 1000, count, maxHeight, parent));
 }