示例#1
0
 public SeparateStrategy(
     IBoid host,
     float weight,
     float sqrSeparationRadius,
     float separationIntensity,
     NeighborQuerier neighborQuerier)
     : base(host, weight)
 {
     _sqrSeparationRadius = sqrSeparationRadius;
     _separationIntensity = separationIntensity;
     _neighborQuerier     = neighborQuerier;
 }
示例#2
0
 public LeaderFollowing(
     IBoid host,
     float followTailweight,
     IBoid leader,
     float maxDistancefromLead,
     float separateWeight,
     NeighborQuerier neighborQuerier,
     float separationRadius)
     : base(host, 1)
 {
     _leaderTail          = new LeaderTail(leader, maxDistancefromLead);
     _arriveToleader      = new SeekTargetStrategy(host, followTailweight, _leaderTail);
     _neighborsSeparation = new SeparateStrategy(host, separateWeight, separationRadius, 5, neighborQuerier);
 }