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)
 {
 }
Example #3
0
 internal override float getAttractingMagnitude(MovableObject other)
 {
     return(1);
 }
Example #4
0
 public MovingObjectWithAirResistance(MovableObject movableObject, float resistance = 0.5f) : base(movableObject)
 {
     Resistance = resistance;
 }
Example #5
0
 internal abstract float getAttractingMagnitude(MovableObject other);
Example #6
0
 internal abstract float getRepellingMagnitude(MovableObject other);
Example #7
0
        internal override float getAttractingMagnitude(MovableObject other)
        {
            MovingObjectWithMass _other = other as MovingObjectWithMass;

            return(Mass * _other.Mass * movableObject.getAttractingMagnitude(_other));
        }