Example #1
0
            public void LookCalculator_HasLookInput_Returns_True_When_Y_Above_0()
            {
                var lookCalculator = new LookCalculator();

                var hasLookInput = lookCalculator.HasLookInput(Vector2.down);

                Assert.IsTrue(hasLookInput);
            }
Example #2
0
            public void LookCalculator_HasLookInput_Returns_False_When_Y_Is_0()
            {
                var lookCalculator = new LookCalculator();

                var hasLookInput = lookCalculator.HasLookInput(Vector2.zero);

                Assert.IsFalse(hasLookInput);
            }
Example #3
0
    private void UpDown()
    {
        if (!_lookCalculator.HasLookInput(_lookInput))
        {
            return;
        }

        _lookAngle = _lookCalculator.GetNewLookAngle(_lookInput.y, _lookAngle, lookSpeed, Time.deltaTime);

        _camera.transform.localEulerAngles = _lookCalculator.GetNewLookRotation(_lookAngle);
    }