Exemple #1
0
 public Boid[] GetNeighbours(Boid boid)
 {
     return(_boids.Where(b => Vector3.SqrMagnitude(b.Transform.Position - boid.Transform.Position) < 25 * 25).ToArray());
 }
Exemple #2
0
 public void AddBoid(Boid boid)
 {
     boid.Flock = this;
     _boids.Add(boid);
 }