internal override float getAttractingMagnitude(MovableObject other) { MovingObjectWithMaxForce _other = other as MovingObjectWithMaxForce; return(Math.Min(max, movableObject.getRepellingMagnitude(_other.movableObject))); }
public MovingObjectWithMaxForce(MovableObject movableObject) : base(movableObject) { }
internal override float getAttractingMagnitude(MovableObject other) { return(1); }
public MovingObjectWithAirResistance(MovableObject movableObject, float resistance = 0.5f) : base(movableObject) { Resistance = resistance; }
internal abstract float getAttractingMagnitude(MovableObject other);
internal abstract float getRepellingMagnitude(MovableObject other);
internal override float getAttractingMagnitude(MovableObject other) { MovingObjectWithMass _other = other as MovingObjectWithMass; return(Mass * _other.Mass * movableObject.getAttractingMagnitude(_other)); }