Exemplo n.º 1
0
 void Start()
 {
     square.Initialize(radius * 2);
     circle.Initialize(radius);
     points = SpawnRandomPoints.SpawnRandomPointCloud(numberOfPoints, radius * 2, transform, true);
     Debug.Log("Approximation of Pi: " + ApproximatePi());
 }
Exemplo n.º 2
0
 void Start()
 {
     mainPoint = SpawnRandomPoints.SpawnRandomPoint(zoneSize, false);
     mainPoint.transform.localScale *= 4;
     mainPoint.GetComponent <Renderer>().material.color = Color.green;
     points = SpawnRandomPoints.SpawnRandomPointCloud(numOfPoints, zoneSize, transform, false);
     if (ReturnNearestPoint() != null)
     {
         GameObject nearestPoint = ReturnNearestPoint().gameObject;
         nearestPoint.GetComponent <Renderer>().material.color = Color.red;
     }
 }
Exemplo n.º 3
0
 void Start()
 {
     points   = SpawnRandomPoints.SpawnRandomPointCloud(numOfPoints, zoneSize, transform, false);
     centroid = (GameObject)GameObject.Instantiate(Resources.Load("Prefabs/BigRedPoint"), CalculateCentroid(), Quaternion.identity);
     SetupWanderScripts();
 }