Exemplo n.º 1
0
        public void ChacterMovingWithMovementAffectedByGravity_DeceleratesWhenClimbing()
        {
            Flight.Activate(100);
            Flight.TurnTowards(0, PitchHexFacing.StraightUp);

            Flight.MoveCharacter(100);

            //half because of gravity
            Assert.AreEqual(50, Flight.InchesMovingThisPhase);
            //flight is fininshed
            Assert.IsNull(Character.ManueverInProgess);
        }
Exemplo n.º 2
0
        public void ChacterMovingWithMovementAffectedByGravity_AcceleratesWhenDiving()
        {
            Flight.Activate(100);
            Flight.TurnTowards(0, PitchHexFacing.DiagonalDown);

            Flight.MoveCharacter(100);


            Assert.AreEqual(200, Flight.InchesMovingThisPhase);
            Assert.AreEqual(200, Flight.Velocity);
            //flight is fininshed
            Assert.IsNull(Character.ManueverInProgess);
        }
Exemplo n.º 3
0
        public void CharacterMovesAndAcceleratesOrDecelerates_AcceleratesAndDeceleratesAtFiveInchesPerHexMoved()
        {
            Flight.Activate(100);
            Flight.MoveCharacter(1);

            Assert.AreEqual(5, CharacterMovement.Velocity);

            Flight.MoveCharacter(18, AccelerationDirection.Accelerate);
            Assert.AreEqual(95, CharacterMovement.Velocity);


            Flight.MoveCharacter(10, AccelerationDirection.Decelerate);
            Assert.AreEqual(45, CharacterMovement.Velocity);
        }
Exemplo n.º 4
0
        ChacterMovingWithMovementAffectedByGravityAndAcceleratesWhenDiving_CanOnlyDecelerateAtOriginalFLightSpeed()
        {
            FlightManuever.Perform();
            Flight.Facing.Pitch = PitchHexFacing.Level;
            //Flight.ChracterFacing = PitchHexFacing.Level;
            Flight.Activate(100);

            Flight.TurnTowards(0, PitchHexFacing.StraightDown);

            Flight.RaceForward();

            Flight.StopMovingCharacter();

            Assert.AreEqual(100, Flight.Velocity);
            Assert.AreEqual(FlightManuever, Character.ManueverInProgess);

            Flight.StopMovingCharacter();
            Assert.AreEqual(null, Character.ManueverInProgess);
        }
Exemplo n.º 5
0
 public void startFlying()
 {
     Flight.Activate(100);
     Flight.Facing.Yaw = YawHexFacing.North;
 }