コード例 #1
0
 public static SteeringBehaviour Create(SteeringEntity self, SteeringEntity target, float maxSpeed, float amount)
 {
     return(new Seek
     {
         self = self,
         target = target,
         maxSpeed = maxSpeed,
         amount = amount
     });
 }
コード例 #2
0
 public static SteeringAgent CreateSeeker(out SteeringEntity self, out SteeringEntity target, float maxSpeed, float seekAmount, float maxSteeringForce)
 {
     self   = new SteeringEntity();
     target = new SteeringEntity();
     return(new SteeringAgent
     {
         maxSteeringForce = maxSteeringForce,
         steeringBehaviours = new[]
         {
             Seek.Create(self, target, maxSpeed, seekAmount)
         }
     });
 }