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