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(); }
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; }
public IParticleMover GetIParticleMover(MovementCostCalculator calculator) { return(new WaveParticleMover(maxSpeed, calculator)); }
public IParticleMover GetIParticleMover(MovementCostCalculator calculator) { return(new GravityPointMover(new ParticleBouncer(), swapTime, random, maxSpeed, calculator)); }
public WaveParticleMover(float maxSpeed, MovementCostCalculator costCalculator) { this.costCalculator = costCalculator; this.maxSpeed = maxSpeed; }
public IParticleMover GetIParticleMover(MovementCostCalculator calculator) { return(new BiasedParticleMover(randomizer, calculator, maxSpeed, biasVector, acceleration)); }