コード例 #1
0
 public BiasedParticleMover(Random randomizer, MovementCostCalculator calculator, float maxSpeed,
                            Vector3 accelerationBias, float acceleration)
 {
     this.randomizer       = randomizer;
     this.accelerationBias = accelerationBias;
     costCalculator        = calculator;
     this.acceleration     = acceleration;
     maxSpeedSquared       = maxSpeed * maxSpeed;
     bouncer = new ParticleBouncer();
 }
コード例 #2
0
 public GravityPointMover(ParticleBouncer bouncer, float swapTime, Random random, float maxSpeed, MovementCostCalculator calculator)
 {
     throw new Exception("Outdated, takes no max speed into account");
     this.bouncer    = bouncer;
     this.swapTime   = swapTime;
     this.random     = random;
     gravityPoint    = new Vector3();
     maxSpeedSquared = maxSpeed * maxSpeed;
     costCalculator  = calculator;
 }