예제 #1
0
        public void TestApplyForceLeft()
        {
            Vec2F oldVelocity = physics.GetRawVelocity();

            physics.ApplyForce(Physics.ForceDirection.Left, 4000);
            Vec2F newVelocity = physics.GetRawVelocity();

            Assert.Greater(oldVelocity.X, newVelocity.X);
        }
예제 #2
0
        /// <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);
            }
        }