Esempio n. 1
0
    //-------------------------------------------------------------------------------------------------------
    protected void updateInfo()
    {
        if (mGameCamera == null)
        {
            return;
        }
        CameraLinker linker = mGameCamera.getCurLinker();

        if (linker != null)
        {
            mCurLinkerName    = linker.getName();
            mLinkedObject     = linker.getLinkObject().getObject();
            mLinkedObjectName = linker.getLinkObject().getName();
            mRelative         = linker.getRelativePosition();
            if (mLinkedObject != null)
            {
                mCurRelative = mGameCamera.getWorldPosition() - mLinkedObject.transform.position;
            }
            else
            {
                mCurRelative = Vector3.zero;
            }
        }
        else
        {
            mCurLinkerName    = "";
            mLinkedObjectName = "";
            mLinkedObject     = null;
            mRelative         = Vector3.zero;
            mCurRelative      = Vector3.zero;
        }
    }
Esempio n. 2
0
    public void Update()
    {
        if (!FrameBase.mGameFramework.isEnableScriptDebug())
        {
            return;
        }
        if (mGameCamera == null)
        {
            return;
        }
        CameraLinker linker = mGameCamera.getCurLinker();

        if (linker != null)
        {
            CurLinkerName    = UnityUtility.Typeof(linker).ToString();
            LinkedObject     = linker.getLinkObject().getObject();
            LinkedObjectName = linker.getLinkObject().getName();
            Relative         = linker.getRelativePosition();
            if (LinkedObject != null)
            {
                CurRelative = mGameCamera.getWorldPosition() - LinkedObject.transform.position;
            }
            else
            {
                CurRelative = Vector3.zero;
            }
        }
        else
        {
            CurLinkerName    = StringUtility.EMPTY;
            LinkedObjectName = StringUtility.EMPTY;
            LinkedObject     = null;
            Relative         = Vector3.zero;
            CurRelative      = Vector3.zero;
        }
        ActiveComponent.Clear();
        var allComponents = mGameCamera.getAllComponent().getUpdateList();

        foreach (var item in allComponents)
        {
            if (item.Value.isActive())
            {
                ActiveComponent.Add(item.Key.ToString());
            }
        }
    }