public void TestApplyForceLeft() { Vec2F oldVelocity = physics.GetRawVelocity(); physics.ApplyForce(Physics.ForceDirection.Left, 4000); Vec2F newVelocity = physics.GetRawVelocity(); Assert.Greater(oldVelocity.X, newVelocity.X); }
/// <summary> /// Activates the booster /// </summary> private void Booster() { if (LeftOrRightBoosterActive) { switch (taxiOrientation) { case Orientation.Left: physics.ApplyForce(Physics.ForceDirection.Left, BoostPower); break; case Orientation.Right: physics.ApplyForce(Physics.ForceDirection.Right, BoostPower); break; } } if (BottomBoosterActive) { physics.ApplyForce(Physics.ForceDirection.Up, BoostPower); } }