Ejemplo n.º 1
0
 public override void generateWaypoints()
 {
     flightPath.Clear();
     for (int i = 0; i < pathSize; i++)
     {
         System.Random  random   = GlobalRandom.getInstance().getRandom();
         float          x        = (float)random.NextDouble() * fieldSize.x - (float)random.NextDouble() * fieldSize.x;
         float          y        = (float)random.NextDouble() * fieldSize.y - (float)random.NextDouble() * fieldSize.y;
         float          z        = (float)random.NextDouble() * fieldSize.z - (float)random.NextDouble() * fieldSize.z;
         FlightWaypoint waypoint = Instantiate(wayPointPrefab, new Vector3(x, y, z), Quaternion.identity);
         flightPath.Add(waypoint);
     }
 }
Ejemplo n.º 2
0
 public override void generateWaypoints()
 {
     waypoint = Instantiate(wayPointPrefab, pos, Quaternion.identity);
 }