public void ApplyForce(Vector3 _v) { foreach (var Boid in Boids) { Boid.ApplyForce(_v); } }
IEnumerator InduceCoRoutine(List <BoidDist> _BoidList, Vector3 _Direction) { _Direction.Normalize(); foreach (var _Boid in _BoidList) { Boid b = _Boid.Boid; float Dist = _Boid.Distance; float Scale = Mathf.Lerp(5.0000f, 0.0001f, Dist / DistLimit); b.ApplyForce(Scale * _Direction); yield return(new WaitForSeconds(0.002f)); } }