public void LookCalculator_HasTurnInput_Returns_True_When_X_Above_0() { var lookCalculator = new LookCalculator(); var hasTurnInput = lookCalculator.HasTurnInput(Vector2.right); Assert.IsTrue(hasTurnInput); }
public void LookCalculator_HasTurnInput_Returns_False_When_X_Is_0() { var lookCalculator = new LookCalculator(); var hasTurnInput = lookCalculator.HasTurnInput(Vector2.zero); Assert.IsFalse(hasTurnInput); }
private void Turn() { if (!_lookCalculator.HasTurnInput(_lookInput)) { return; } transform.Rotate(Vector3.up * (_lookInput.x * Time.deltaTime * lookSpeed)); }