Пример #1
0
    void RotateAround(float _sensibility)
    {
        float _distanceTemp = 10;

        _angleHorizon += -TCT_AxisRecuperator.GetAxis(AxisCode.MouseX) * _sensibility * 0.01f;

        _angleVerti += TCT_AxisRecuperator.GetAxis(AxisCode.MouseY) * _sensibility * 0.01f;

        Vector3 _finalPos = SphericTrigo(_angleHorizon, _angleVerti, _distanceTemp) + ownOption.OffsetSmartCam;

        transform.position += _finalPos;
    }
    private void Update()
    {
        allActionInput.ForEach(n =>
        {
            for (int i = 0; i < n.AllKeyCodes.Count; i++)
            {
                n.ActionInput?.Invoke(Input.GetKey(n.AllKeyCodes[i]));
            }
        }
                               );

        allAxisInput.ForEach(n =>
        {
            for (int i = 0; i < n.AllAxisCode.Count; i++)
            {
                n.AxisInput?.Invoke(TCT_AxisRecuperator.GetAxis(n.AllAxisCode[i]));
            }
        });
    }