public void _1_Delta_X_MvSpeed_Y_Input_Sets_Value_To_xXYy0zXY(float mvSpeed, float inputUnitMagnitude) { LocomotionMovement locomotion = A.LocomotionMovement().WithInput(Vector2.one * inputUnitMagnitude).WithSpeed(mvSpeed); var expectedVal = new Vector3(mvSpeed * inputUnitMagnitude, 0f, mvSpeed * inputUnitMagnitude); locomotion.Tick(1); Assert.AreEqual(expectedVal, locomotion.Value); }
public void _1_Delta_0_MvSpeed_1_Input_DoesntSet_Value() { LocomotionMovement locomotion = A.LocomotionMovement().WithInput(Vector2.one); var prevVal = locomotion.Value; locomotion.Tick(1); Assert.AreEqual(prevVal, locomotion.Value); }
public void _1_Delta_X_MvSpeed_0_Input_DoesntSet_Value(float mvSpeed) { LocomotionMovement locomotion = A.LocomotionMovement().WithSpeed(mvSpeed); var prevVal = locomotion.Value; locomotion.Tick(1); Assert.AreEqual(prevVal, locomotion.Value); }
public void _1_Delta_X_MvSpeed_1_Input_Sets_To_xXy0zX(float mvSpeed) { LocomotionMovement locomotion = A.LocomotionMovement().WithInput(Vector2.one).WithSpeed(mvSpeed); var expectedValue = new Vector3(mvSpeed, 0f, mvSpeed); locomotion.Tick(1); Assert.AreEqual(expectedValue, locomotion.Value); }
public void _0_DeltaMvSpeedAndInput_DoesntSet_Value() { LocomotionMovement locomotion = A.LocomotionMovement(); var prevVal = locomotion.Value; locomotion.Tick(0); Assert.AreEqual(prevVal, locomotion.Value); }
public void Negative_Delta_1_MvSpeedAndInput_DoesntSet_Value(float delta) { LocomotionMovement locomotion = A.LocomotionMovement().WithInput(Vector2.one).WithSpeed(1); var prevVal = locomotion.Value; locomotion.Tick(delta); Assert.AreEqual(prevVal, locomotion.Value); }