예제 #1
0
    private void LateUpdate()
    {
        if (cameraLink == null)
        {
            cameraLink = GetComponent <LinkCamera>();
        }
        if (entityLink == null)
        {
            entityLink = GetComponent <LinkEntity>();
        }

        if (cameraLink == null || entityLink == null)
        {
            return;
        }

        if (cameraLink.active == null)
        {
            return;
        }
        if (entityLink.linked == null || UMMO.IsDead(entityLink.linked))
        {
            cameraLink.active.transform.position = Vector3.zero; return;
        }

        DX4D.Follow(cameraLink.active.transform, entityLink.linked.transform, followOffset);
        LookAt(cameraLink.active, entityLink.linked);
    }
예제 #2
0
    //UPDATE
    void Update()
    {
        LoadLinks();

        if (cameraLink == null || entityLink == null)
        {
            return;
        }
        if (cameraLink.active == null)
        {
            return;
        }

        followOffset = GetOffsets();
        DX4D.ChangeCameraView(cameraLink.active, cameraZoom, cameraFieldOfView, showLayers);

        if (entityLink.linked == null || UMMO.IsDead(entityLink.linked))
        {
            cameraLink.active.transform.position = Vector3.zero; return;
        }

        DX4D.Follow(cameraLink.active.transform, entityLink.linked.transform, followOffset);
        ConfigureCameraLookAt(cameraLink.active, entityLink.linked);
    }