示例#1
0
        public Engagement(IBoid host)
        {
            _host     = host;
            _flockers = new List <IBoid>();

            _ahead              = new Boid();
            _ahead._position    = _host._Position;
            _ahead._velocity    = _host._Velocity;
            _ahead._maxVelocity = _host._MaxVelocity;

            _arrive     = new Arrive(_host);
            _evade      = new Evade(_host);
            _separation = new Separation(_host);

            _arrive._target = _target;
            _evade._target  = _ahead;

            _separation._boids  = _flockers;
            _separation._RADIUS = 1.0f;
            _separation._WEIGHT = 0.75f;
        }