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

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