示例#1
0
    IEnumerator OpenInCoroutine()
    {
        float fov = FOVModifier;

        for (float t = 0; t < 1; t += Time.deltaTime * effectSpeed)
        {
            transform.localPosition = Vector3.Lerp(transform.position, defaultPosition, t);
            transform.localRotation = Quaternion.Lerp(transform.localRotation, defaultRotation, t);

            fov = Mathf.Lerp(fov, 0, t);
            cameraEffector.ModifyCam(fov);
            yield return(null);
        }


        transform.localPosition = defaultPosition;
        transform.localRotation = defaultRotation;
        cameraEffector.ModifyCam(0);
    }
示例#2
0
    private void SetCameraModifier(float f)
    {
        currentCamModifier = f;

        destCamera.ModifyCam(currentCamModifier);
    }