Example #1
0
        public void T03bUpdateMovementDirection_ReturnsBackward()
        {
            var inputs = new Vector3(1, 1, 1);             //Any Vector that's not zeromeans it's moving.
            var angleOfMovementDirectionFromSightDirection = backwardWalkRestrictinAngle;

            var mock = new PlayerControlMock(inputs);
            var sut  = new PlayerMovementController(
                mock, walkRestrictionArgs
                );

            sut.UpdateMovementDirection(angleOfMovementDirectionFromSightDirection);

            Assert.AreEqual(
                PlayerMovementController.MovementDirection.BACKWARD, sut.movementDirection
                );
        }
Example #2
0
        public void T05aUpdateMovementDirection_ReturnsRight()
        {
            var inputs = new Vector3(1, 1, 1);             //Any Vector that's not zeromeans it's moving.
            var angleOfMovementDirectionFromSightDirection = 90f;

            var mock = new PlayerControlMock(inputs);
            var sut  = new PlayerMovementController(
                mock, walkRestrictionArgs
                );

            sut.UpdateMovementDirection(angleOfMovementDirectionFromSightDirection);

            Assert.AreEqual(
                PlayerMovementController.MovementDirection.RIGHT, sut.movementDirection
                );
        }