예제 #1
0
    void LoadHuXingRenderThumbnail(RenderTexture renderTex, string hxName)
    {
        foreach (SenceInteractiveInfo s in senceInteractiveInfoGroup)
        {
            if (s.huXingType.hxName == currentSelectHuXingType.hxName)
            {
                if (s != null && senceInteractiveInfoGroup[0] != null)
                {
//                  Debug.Log("444");

                    currentSelectSenceInteractiveInfo = s;

                    s.cameraUniversalCenter.currentCamera.GetComponent <Camera>().targetTexture = renderTex;
                    s.cameraUniversalCenter.currentCamera.EnableCamera();

                    currentSelectSenceInteractiveInfo.transform.parent        = s.huXingType.hxMeshRoot;
                    currentSelectSenceInteractiveInfo.transform.localPosition = Vector3.zero;
                    currentSelectSenceInteractiveInfo.transform.localRotation = new Quaternion();

                    s.huXingType.hxMeshRoot.position    = s.huXingType.hxNKWorldPos;
                    s.huXingType.hxMeshRoot.eulerAngles = new Vector3(0, s.huXingType.rotOffset, 0);
                    s.huXingType.hxMeshRoot.gameObject.SetActive(true);

                    s.cameraUniversalCenter.currentCamera.GetComponent <Camera>().Render();
                    s.cameraUniversalCenter.currentCamera.GetComponent <Camera>().targetTexture = null;
                    s.cameraUniversalCenter.currentCamera.DisableCamera();
                    s.huXingType.hxMeshRoot.gameObject.SetActive(false);
                }
            }
        }
    }
예제 #2
0
 public void RemoveSenceInteractiveInfo(SenceInteractiveInfo s)
 {
     if (senceInteractiveInfoGroup.Contains(s))
     {
         senceInteractiveInfoGroup.Remove(s);
     }
 }
예제 #3
0
    public void HiddenAddScene(SenceInteractiveInfo s)
    {
        //隐藏模型,隐藏ui,隐藏event,关闭默认相机
        if (s.sceneType != SenceInteractiveInfo.SceneType.大场景)
        {
            foreach (Transform t in s.huXingType.hxMeshRoot.GetComponentsInChildren <Transform>())
            {
                t.gameObject.layer = 29;
            }

            s.huXingType.hxMeshRoot.gameObject.SetActive(false);

            foreach (Canvas c in s.GetComponentsInChildren <Canvas>(true))
            {
                c.gameObject.SetActive(false);
            }

            foreach (EventSystem e in s.GetComponentsInChildren <EventSystem>(true))
            {
                e.gameObject.SetActive(false);
            }

            //设置毛坯相机的layer
            foreach (CameraUniversal c in s.cameraUniversalCenter.cameras)
            {
                //0011 1111 1111 1111 1111 1111 1111 1111
                //设置不渲染30层
                c.GetComponent <Camera>().cullingMask &= 0x3FFFFFFF;
            }

            s.cameraUniversalCenter.currentCamera.DisableCamera();
        }
    }
예제 #4
0
    public void EnterAR_HX(SenceInteractiveInfo s)
    {
        GlobalDebug.Addline("EnterAR_HX");

        hxScene = s;

        for (int i = 0; i < hxSceneHuXingTypeFinal.Length; i++)
        {
            if (hxSceneHuXingTypeFinal[i].hxName == s.huXingType.hxName)
            {
                currentSelectHuXingType = hxSceneHuXingTypeFinal[i];
            }
        }

        triggerEnterHX.AlphaPlayBackward();
        triggerEnterFangJian.AlphaPlayBackward();
//      triggerShare.AlphaPlayBackward();
        triggerVR.AlphaPlayBackward();
        triggerHuXingThumbnail.AlphaPlayBackward();

        huXingInfoLabel.DisplayHuXingInfoLabel(currentSelectHuXingType.GetHuXingTypeInfo());
        pmtImagePlayer.netTexture2DGroup = currentSelectHuXingType.netTexture2DGroup;


        DisplayHuXingFloorScrollMenu();
    }
예제 #5
0
    public void HiddenScene(SenceInteractiveInfo s)
    {
        //隐藏模型,隐藏ui,隐藏event,关闭默认相机
        if (s.sceneType == SenceInteractiveInfo.SceneType.loft ||
            s.sceneType == SenceInteractiveInfo.SceneType.叠拼 ||
            s.sceneType == SenceInteractiveInfo.SceneType.平层 ||
            s.sceneType == SenceInteractiveInfo.SceneType.独栋 ||
            s.sceneType == SenceInteractiveInfo.SceneType.联排
            )
        {
            foreach (Transform t in s.huXingType.hxMeshRoot.GetComponentsInChildren <Transform>())
            {
                t.gameObject.layer = 29;
            }
            if (s.huXingType.hxMeshRoot != null)
            {
                s.huXingType.hxMeshRoot.gameObject.SetActive(false);
            }

            if (s.huXingType.fastMovePointManager != null)
            {
                foreach (Transform t in s.huXingType.fastMovePointManager.GetComponentsInChildren <Transform>())
                {
                    //28层为快速移动层
//                    t.gameObject.layer = 28;
                }
            }


            //设置毛坯相机的layer
            foreach (CameraUniversal c in s.cameraUniversalCenter.cameras)
            {
                //0011 1111 1111 1111 1111 1111 1111 1111
                //设置不渲染30层
                c.GetComponent <Camera>().cullingMask &= 0x3FFFFFFF;
                //关闭所有相机
                c.DisableCamera();
            }
        }


        if (s.meshRoot != null)
        {
            s.meshRoot.gameObject.SetActive(false);
        }

        foreach (Canvas c in s.GetComponentsInChildren <Canvas>(true))
        {
            c.gameObject.SetActive(false);
        }

        foreach (EventSystem e in s.GetComponentsInChildren <EventSystem>(true))
        {
            e.gameObject.SetActive(false);
        }

//        s.cameraUniversalCenter.currentCamera.DisableCamera();
    }
예제 #6
0
    /// <summary>
    /// 竖屏进入户型
    /// </summary>
    /// <param name="inName"></param>
    public void OnlyEnterHXNK(string inName)
    {
        GlobalDebug.Addline("Portrait EnterHXNK");

        foreach (SenceInteractiveInfo s in sceneInteractiveManger.senceInteractiveInfoGroup)
        {
            if (inName == s.huXingType.hxName)
            {
                if (s.huXingType.hxMeshRoot != null)
                {
                    appBridge.Unity2App("unityOpenRoomType", currentSelectHuXingType.huXingID);
                    Debug.Log("unityOpenRoomType:" + currentSelectHuXingType.huXingID);
                    GlobalDebug.Addline("unityOpenRoomType:" + currentSelectHuXingType.huXingID);

                    hxScene = s;

                    for (int i = 0; i < hxSceneHuXingTypeFinal.Length; i++)
                    {
                        if (hxSceneHuXingTypeFinal[i].hxName == s.huXingType.hxName)
                        {
                            currentSelectHuXingType = hxSceneHuXingTypeFinal[i];
                        }
                    }

                    if (hxScene.meshRoot != null)
                    {
                        hxScene.meshRoot.transform.position = new Vector3(0, 500, 0);
                        hxScene.cameraUniversalCenter.transform.position = new Vector3(0, 500, 0);
                    }

                    sceneInteractiveManger.ChangeInteractiveScene(hxScene, true);

//                  triggerVR.AlphaPlayBackward();
//                  triggerEnterFangJian.AlphaPlayBackward();
//                  triggerFCZ.transform.localPosition = new Vector3(0, 100, 0);
                    triggerFCZ.AlphaPlayForward();
//                  triggerEnterFangJian.transform.localPosition = new Vector3(-500, 0, 0);
                    triggerEnterHX.AlphaPlayBackward();
                    triggerHuXingThumbnail.AlphaPlayBackward();
                    xfGUI.triggerOutDoorThumbnail.AlphaPlayBackward();

                    huXingInfoLabel.DisplayHuXingInfoLabel(currentSelectHuXingType.GetHuXingTypeInfo());
                    pmtImagePlayer.netTexture2DGroup = currentSelectHuXingType.netTexture2DGroup;

                    DisplayHuXingFloorScrollMenu();

                    huXingCameraBG.transform.parent        = hxScene.cameraUniversalCenter.cameras[0].transform;
                    huXingCameraBG.transform.localPosition = new Vector3(0, 0, 90);
                    huXingCameraBG.transform.rotation      = new Quaternion();
                    huXingCameraBG.transform.localScale    = new Vector3(250, 140, 1);

                    appBridge.Unity2App("unityOpenRoomTypeDone");
                    Debug.Log("unityOpenRoomTypeDone");
                    GlobalDebug.Addline("unityOpenRoomTypeDone");
                }
            }
        }
    }
예제 #7
0
    public void EnterHuXing()
    {
        foreach (SenceInteractiveInfo s in senceInteractiveInfoGroup)
        {
            if (s.huXingType.hxName == currentSelectHuXingType.hxName)
            {
                if (s != null && senceInteractiveInfoGroup[0] != null)
                {
                    currentSelectSenceInteractiveInfo   = s;
                    s.huXingType.hxMeshRoot.position    = s.huXingType.hxNKWorldPos;
                    s.huXingType.hxMeshRoot.eulerAngles = new Vector3(0, s.huXingType.rotOffset, 0);
                    s.huXingType.hxMeshRoot.gameObject.SetActive(true);

                    //选房操作初始化预设
                    if (senceInteractiveInfoGroup[0].sceneType == SenceInteractiveInfo.SceneType.大场景 && senceInteractiveInfoGroup[0].louPanManager != null)
                    {
                        louPanManager = senceInteractiveInfoGroup[0].louPanManager;
                        louPanManager.GetSelectHuXinginstance(s.huXingType.hxName);

                        buildScrollMenu.GetComponentInParent <Transform>().DOLocalMoveY(-700, 0.3f);
                        unitScrollMenu.GetComponentInParent <Transform>().DOLocalMoveY(-700, 0.3f);
                        hxInstanceScrollMenu.GetComponentInParent <Transform>().DOLocalMoveY(-700, 0.3f);
                    }
                }
            }
        }

        triggerHuXingThumbnail.AlphaPlayBackward();
        triggerOutDoorThumbnail.AlphaPlayForward();

        huXingCameraBG.transform.parent        = currentSelectSenceInteractiveInfo.cameraUniversalCenter.cameras[0].transform;
        huXingCameraBG.transform.localPosition = new Vector3(0, 0, 90);
        huXingCameraBG.transform.rotation      = new Quaternion();
        huXingCameraBG.transform.localScale    = new Vector3(250, 140, 1);

        senceInteractiveInfoGroup[0].cameraUniversalCenter.currentCamera.GetComponent <Camera>().targetTexture = thumbnail;
        senceInteractiveInfoGroup[0].cameraUniversalCenter.currentCamera.GetComponent <Camera>().Render();
        senceInteractiveInfoGroup[0].cameraUniversalCenter.currentCamera.GetComponent <Camera>().targetTexture = null;

        senceInteractiveInfoGroup[0].cameraUniversalCenter.ChangeCamera(currentSelectSenceInteractiveInfo.cameraUniversalCenter.cameras[0], 0.0f);

        zbz.cameraUniversalCenter = currentSelectSenceInteractiveInfo.cameraUniversalCenter;

        currentSelectSenceInteractiveInfo.huXingType.hxMeshRoot.gameObject.SetActive(true);

        foreach (Canvas c in senceInteractiveInfoGroup[0].GetComponentsInChildren <Canvas>(true))
        {
            c.gameObject.SetActive(false);
        }

        foreach (Canvas c in currentSelectSenceInteractiveInfo.GetComponentsInChildren <Canvas>(true))
        {
            c.gameObject.SetActive(true);
        }

        DisplayHuXingFloorScrollMenu();
    }
예제 #8
0
    public void ChooseFangJianAndRenderSub(SenceInteractiveInfo outDoor, SenceInteractiveInfo hx, string fangJianInfo)
    {
        HuXingInstance[] selectHuXingInstance = currentL.SelectSingerInstance(currentL.selectHXInstance, int.Parse(buildTextLabel.text), int.Parse(unitTextLabel.text), fangJianInfo);
        //    Debug.Log(selectHuXingInstance.Length);

        if (selectHuXingInstance.Length > 0)
        {
            RenderXFThumbnail(selectHuXingInstance[0], isThumbnailZoomIn);
        }
    }
예제 #9
0
    public void ChooseFangJianAndRenderSub(SenceInteractiveInfo outDoor, SenceInteractiveInfo hx, string fangJianInfo)
    {
        HuXingInstance[] selectHuXingInstance = currentL.SelectSingerInstance(currentL.selectHXInstance, currentLouID, currentUnit, fangJianInfo);
        //    Debug.Log(selectHuXingInstance.Length);

        if (selectHuXingInstance.Length > 0)
        {
            RenderXFThumbnail(selectHuXingInstance[0], isThumbnailZoomIn);
        }
    }
예제 #10
0
    void RenderHuXingThumbnail(string hxName)
    {
        SenceInteractiveInfo s = sceneInteractiveManger.GetHuXingTypeInteractiveInfo(hxName);

//      s.transform.localPosition = s.huXingType.hxMeshRoot.localPosition;
//      s.transform.localRotation = s.huXingType.hxMeshRoot.localRotation;
        s.transform.parent        = s.huXingType.hxMeshRoot;
        s.transform.localPosition = Vector3.zero;
        s.transform.localRotation = new Quaternion();

        s.huXingType.hxMeshRoot.position    = s.huXingType.hxNKWorldPos;
        s.huXingType.hxMeshRoot.eulerAngles = new Vector3(0, s.huXingType.rotOffset, 0);

        sceneInteractiveManger.RenderSenceThumbnail(sceneInteractiveManger.thumbnailHX, s, s.cameraUniversalCenter.cameras[0]);
    }
예제 #11
0
    public void ExitHuXing()
    {
        if (currentSelectSenceInteractiveInfo != null && senceInteractiveInfoGroup[0] != null && currentSelectSenceInteractiveInfo != senceInteractiveInfoGroup[0])
        {
            huXingCameraBG.transform.parent        = this.transform;
            huXingCameraBG.transform.localPosition = new Vector3(0, 0, 90);
            huXingCameraBG.transform.rotation      = new Quaternion();
            huXingCameraBG.transform.localScale    = new Vector3(0, 0, 1);

            if (currentSelectSenceInteractiveInfo.sceneType != SenceInteractiveInfo.SceneType.大场景)
            {
                currentSelectSenceInteractiveInfo.huXingType.DisplayAllFloorMesh();
            }

            currentSelectSenceInteractiveInfo.cameraUniversalCenter.currentCamera.GetComponent <Camera>().targetTexture = thumbnail;
            currentSelectSenceInteractiveInfo.cameraUniversalCenter.currentCamera.GetComponent <Camera>().Render();
            currentSelectSenceInteractiveInfo.cameraUniversalCenter.currentCamera.GetComponent <Camera>().targetTexture = null;

            senceInteractiveInfoGroup[0].cameraUniversalCenter.ChangeCamera(senceInteractiveInfoGroup[0].cameraUniversalCenter.cameras[0], 1);

            currentSelectSenceInteractiveInfo.huXingType.hxMeshRoot.gameObject.SetActive(false);

            //判断是否有Mesh
            if (currentSelectSenceInteractiveInfo.huXingType.hxMeshRoot != null)
            {
                triggerHuXingThumbnail.AlphaPlayForward();
                triggerOutDoorThumbnail.AlphaPlayBackward();
            }
            else
            {
                triggerHuXingThumbnail.AlphaPlayBackward();
            }

            foreach (Canvas c in currentSelectSenceInteractiveInfo.GetComponentsInChildren <Canvas>(true))
            {
                c.gameObject.SetActive(false);
            }

            foreach (Canvas c in senceInteractiveInfoGroup[0].GetComponentsInChildren <Canvas>(true))
            {
                c.gameObject.SetActive(true);
            }
            currentSelectSenceInteractiveInfo = senceInteractiveInfoGroup[0];
            zbz.cameraUniversalCenter         = currentSelectSenceInteractiveInfo.cameraUniversalCenter;
        }
    }
예제 #12
0
    public void EnterAR_HX(SenceInteractiveInfo senceInteractiveInfo)
    {
        GlobalDebug.Addline("EnterAR_HX");

        triggerFCZ.AlphaPlayForward();
        triggerPMT.AlphaPlayBackward();
        triggerEnterHX.AlphaPlayBackward();
        triggerEnterFangJian.AlphaPlayBackward();
        appBridge.defaultGUI.triggerEnterFangJianPortrait.AlphaPlayBackward();
        triggerShare.AlphaPlayForward();
        triggerVR.AlphaPlayBackward();
        triggerHuXingThumbnail.AlphaPlayBackward();

        huXingInfoLabel.DisplayHuXingInfoLabel(senceInteractiveInfo.huXingType.GetHuXingTypeInfo());
        hxScene = senceInteractiveInfo;
        currentSelectHuXingType = senceInteractiveInfo.huXingType;
        DisplayHuXingFloorScrollMenu();
    }
예제 #13
0
    public void EnterHuXing()
    {
        appBridge.Unity2App("unityOpenRoomType", currentSelectHuXingType.huXingID);
        Debug.Log("unityOpenRoomType:" + currentSelectHuXingType.huXingID);
        GlobalDebug.Addline("unityOpenRoomType:" + currentSelectHuXingType.huXingID);

        sceneInteractiveManger.RenderSenceThumbnail(hxfbScene, hxfbScene.cameraUniversalCenter.currentCamera, hxfbCameraArgs);

        hxScene = sceneInteractiveManger.GetHuXingTypeInteractiveInfo(currentSelectHuXingType.hxName);

        hxScene.huXingType.hxMeshRoot.position    = hxScene.huXingType.hxNKWorldPos;
        hxScene.huXingType.hxMeshRoot.eulerAngles = new Vector3(0, hxScene.huXingType.rotOffset, 0);
        hxScene.huXingType.hxMeshRoot.gameObject.SetActive(true);

        //选房操作初始化预设
        if (sceneInteractiveManger.mainSenceInteractiveInfo != null && sceneInteractiveManger.mainSenceInteractiveInfo.louPanManager != null)
        {
            sceneInteractiveManger.mainSenceInteractiveInfo.louPanManager.GetSelectHuXinginstance(hxScene.huXingType.hxName);
            xfGUI.EnterHuXing();
        }

        triggerMusicBtn.AlphaPlayBackward();
        triggerFCZ.AlphaPlayForward();
        triggerShare.AlphaPlayForward();
        triggerHuXingThumbnail.AlphaPlayBackward();
        xfGUI.triggerOutDoorThumbnail.AlphaPlayForward();

        huXingCameraBG.transform.parent        = hxScene.cameraUniversalCenter.cameras[0].transform;
        huXingCameraBG.transform.localPosition = new Vector3(0, 0, 90);
        huXingCameraBG.transform.rotation      = new Quaternion();
        huXingCameraBG.transform.localScale    = new Vector3(250, 140, 1);

        sceneInteractiveManger.ChangeInteractiveScene(hxScene, false);

        DisplayHuXingFloorScrollMenu();

        xfGUI.SetHXSceneAndHXFBScene(hxScene, hxfbScene);

        appBridge.Unity2App("unityOpenRoomTypeDone");
        Debug.Log("unityOpenRoomTypeDone");
        GlobalDebug.Addline("unityOpenRoomTypeDone");
    }
예제 #14
0
    public void RenderSenceThumbnail(RenderTexture renderTexture, SenceInteractiveInfo needRenderScene, CameraUniversal cameraThumbnail, string cameraArgs = "")
    {
        bool orginDisplayState = false;

        if (needRenderScene.sceneType == SenceInteractiveInfo.SceneType.大场景)
        {
            orginDisplayState = needRenderScene.meshRoot.gameObject.activeInHierarchy;
            needRenderScene.meshRoot.gameObject.SetActive(true);
        }
        else
        {
            if (needRenderScene.huXingType.hxMeshRoot != null)
            {
                orginDisplayState = needRenderScene.huXingType.hxMeshRoot.gameObject.activeInHierarchy;
                needRenderScene.huXingType.hxMeshRoot.gameObject.SetActive(true);
            }
        }

        cameraThumbnail.GetComponent <Camera>().targetTexture = renderTexture;
        cameraThumbnail.EnableCamera();
        if (cameraArgs != "")
        {
            cameraThumbnail.SetCameraPositionAndXYZCount(cameraArgs, 0);
        }
        cameraThumbnail.GetComponent <Camera>().Render();
        cameraThumbnail.DisableCamera();
        cameraThumbnail.GetComponent <Camera>().targetTexture = null;

        if (needRenderScene.sceneType == SenceInteractiveInfo.SceneType.大场景)
        {
            needRenderScene.meshRoot.gameObject.SetActive(orginDisplayState);
        }
        else
        {
            if (needRenderScene.huXingType.hxMeshRoot != null)
            {
                needRenderScene.huXingType.hxMeshRoot.gameObject.SetActive(orginDisplayState);
            }
        }
    }
예제 #15
0
    public void CreateHuXingScrollMenu(SceneInteractiveManger s)
    {
        hxfbScene = s.mainSenceInteractiveInfo;

        //先移除SetImageZoomInAndZoomOutBtnFalse这个方法,再添加.保证只添加了一次
        hxfbScene.touchCtrl.hxfbColliderTriggerEvent.RemoveListener(DoubleClickHXFBBox);
        hxfbScene.touchCtrl.hxfbColliderTriggerEvent.AddListener(DoubleClickHXFBBox);

        string[] hxNameG      = new string[hxSceneHuXingTypeFinal.Length];
        string[] displayNameG = new string[hxSceneHuXingTypeFinal.Length];

        for (int i = 0; i < hxSceneHuXingTypeFinal.Length; i++)
        {
            if (hxSceneHuXingTypeFinal[i].displayName == "")
            {
                hxSceneHuXingTypeFinal[i].displayName = hxSceneHuXingTypeFinal[i].hxName;
            }

            hxNameG[i]      = hxSceneHuXingTypeFinal[i].hxName;
            displayNameG[i] = hxSceneHuXingTypeFinal[i].displayName;
        }

        huXingScrollMenu.CreateItemGroup(displayNameG, hxNameG);
    }
예제 #16
0
    public void ChangeInteractiveScene(SenceInteractiveInfo toInteractiveScene, bool disableCurrentSceneMesh)
    {
//     Debug.Log(toInteractiveScene.name);
//     Debug.Log(currentActiveSenceInteractiveInfo.name);

        if (toInteractiveScene == currentActiveSenceInteractiveInfo)
        {
            return;
        }

        if (currentActiveSenceInteractiveInfo != null && disableCurrentSceneMesh)
        {
            if (currentActiveSenceInteractiveInfo.sceneType == SenceInteractiveInfo.SceneType.大场景)
            {
                if (currentActiveSenceInteractiveInfo.meshRoot != null)
                {
                    currentActiveSenceInteractiveInfo.meshRoot.gameObject.SetActive(false);
                }
            }
            else if (currentActiveSenceInteractiveInfo.sceneType == SenceInteractiveInfo.SceneType.Point360)
            {
                if (currentActiveSenceInteractiveInfo.meshRoot != null)
                {
                    currentActiveSenceInteractiveInfo.meshRoot.gameObject.SetActive(false);
                }
            }
            else
            {
                if (currentActiveSenceInteractiveInfo.huXingType.hxMeshRoot != null)
                {
                    currentActiveSenceInteractiveInfo.huXingType.hxMeshRoot.gameObject.SetActive(false);
                }
            }
        }

        if (toInteractiveScene.sceneType == SenceInteractiveInfo.SceneType.Point360)
        {
            globalCameraCenter.ChangeCamera(toInteractiveScene.cameraUniversalCenter.cameras[1], 0.0f);
        }
        else
        {
            globalCameraCenter.ChangeCamera(toInteractiveScene.cameraUniversalCenter.cameras[0], 0.0f);
        }

        if (toInteractiveScene.sceneType == SenceInteractiveInfo.SceneType.大场景)
        {
            if (toInteractiveScene.meshRoot != null)
            {
                toInteractiveScene.meshRoot.gameObject.SetActive(true);
            }
            mainSenceInteractiveInfo = toInteractiveScene;
            //defaultGUI.DisplayDefaultGUI();
        }
        else if (toInteractiveScene.sceneType == SenceInteractiveInfo.SceneType.Point360)
        {
            if (toInteractiveScene.meshRoot != null)
            {
                toInteractiveScene.meshRoot.gameObject.SetActive(true);
            }
            mainSenceInteractiveInfo = toInteractiveScene;
        }
        else
        {
            if (toInteractiveScene.huXingType.hxMeshRoot != null)
            {
                toInteractiveScene.huXingType.hxMeshRoot.gameObject.SetActive(true);
            }
        }

        if (currentActiveSenceInteractiveInfo != null)
        {
            foreach (Canvas c in currentActiveSenceInteractiveInfo.GetComponentsInChildren <Canvas>(true))
            {
                c.gameObject.SetActive(false);
            }
        }

        foreach (Canvas c in toInteractiveScene.GetComponentsInChildren <Canvas>(true))
        {
            c.gameObject.SetActive(true);
        }

        currentActiveSenceInteractiveInfo = toInteractiveScene;
        globalCameraCenter.zbzOffset      = toInteractiveScene.cameraUniversalCenter.zbzOffset;
        zbz.cameraUniversalCenter         = toInteractiveScene.cameraUniversalCenter;

        //    loadingManager.load
        if (CartoonPlayer.hasInit)
        {
            PlayCartoonAni();
        }
    }
예제 #17
0
    public void AddSenceInteractiveInfo(SenceInteractiveInfo s)
    {
        if (senceInteractiveInfoGroup == null)
        {
            senceInteractiveInfoGroup = new List <SenceInteractiveInfo>();
        }

        if (!senceInteractiveInfoGroup.Contains(s))
        {
            if (s.sceneType == SenceInteractiveInfo.SceneType.大场景)
            {
                currentSelectSenceInteractiveInfo = s;
                zbz.cameraUniversalCenter         = s.cameraUniversalCenter;

                //设置大场景相机的layer
                foreach (CameraUniversal c in s.cameraUniversalCenter.cameras)
                {
                    //0101 1111 1111 1111 1111 1111 1111 1111
                    //屏蔽29层
                    c.GetComponent <Camera>().cullingMask &= 0x5FFFFFFF;
                }
            }
            else
            {
                //从复制单个场景中的info到allHuXingTypeFromWeb
                foreach (HuXingType h in allHuXingTypeFromWeb)
                {
                    if (s.huXingType.hxName == h.hxName)
                    {
                        if (h.displayName == "")
                        {
                            if (s.huXingType.displayName == "")
                            {
                                s.huXingType.displayName = s.huXingType.hxName;
                            }

                            h.displayName = s.huXingType.displayName;
                        }

                        if (h.leiXing == "")
                        {
                            h.leiXing = s.huXingType.leiXing;
                        }
                        if (h.introduction == "")
                        {
                            h.introduction = s.huXingType.introduction;
                        }
                        h.PMT                    = s.huXingType.PMT;
                        h.proxyRoot              = s.huXingType.proxyRoot;
                        h.hxMeshRoot             = s.huXingType.hxMeshRoot;
                        h.rotOffset              = s.huXingType.rotOffset;
                        h.nkCameraPosAndXYZcount = s.huXingType.nkCameraPosAndXYZcount;
                        h.allFloor               = s.huXingType.allFloor;
                    }
                }
            }

            HiddenAddScene(s);

            senceInteractiveInfoGroup.Add(s);
        }
    }
예제 #18
0
    public void AddSenceInteractiveInfo(SenceInteractiveInfo s)
    {
        if (s.meshRoot != null)
        {
            //查找websky,因为由些老的项目websky没有正确设置
            if (s.websky == null)
            {
                Transform t = s.meshRoot.Find("websky");
                if (t != null)
                {
                    s.websky = t;
                }
            }
            RecoverMatShader(s.meshRoot);
        }


        s.sceneName = addSceneName;

        if (senceInteractiveInfoGroup == null)
        {
            senceInteractiveInfoGroup = new List <SenceInteractiveInfo>();
        }

        if (!senceInteractiveInfoGroup.Contains(s))
        {
            foreach (CameraUniversal c in s.cameraUniversalCenter.cameras)
            {
                c.InitlCameraInRuntime();
                RecoverMatShader(c.camBase.transform);
            }

//         Debug.Log(3333);
            if (s.sceneType == SenceInteractiveInfo.SceneType.大场景)
            {
                if (s.f3d_Area.replaceDefaultBtnName != null && s.f3d_Area.replaceDefaultBtnName != "")
                {
                    mainBtnEventProxyGroup.baseButtonGroup[0].label.text       = s.f3d_Area.replaceDefaultBtnName;
                    mainBtnEventProxyGroup.baseButtonGroup[0].shadowLabel.text = s.f3d_Area.replaceDefaultBtnName;
                }

                if (s.f3d_Intro.replaceDefaultBtnName != null && s.f3d_Intro.replaceDefaultBtnName != "")
                {
                    mainBtnEventProxyGroup.baseButtonGroup[1].label.text       = s.f3d_Intro.replaceDefaultBtnName;
                    mainBtnEventProxyGroup.baseButtonGroup[1].shadowLabel.text = s.f3d_Intro.replaceDefaultBtnName;
                }

                if (s.f3d_Supports.replaceDefaultBtnName != null && s.f3d_Supports.replaceDefaultBtnName != "")
                {
//                    Debug.LogError(s.f3d_Supports.replaceDefaultBtnName);
                    mainBtnEventProxyGroup.baseButtonGroup[2].label.text       = s.f3d_Supports.replaceDefaultBtnName;
                    mainBtnEventProxyGroup.baseButtonGroup[2].shadowLabel.text = s.f3d_Supports.replaceDefaultBtnName;
                }

                if (s.f3d_Traffic.replaceDefaultBtnName != null && s.f3d_Traffic.replaceDefaultBtnName != "")
                {
                    mainBtnEventProxyGroup.baseButtonGroup[3].label.text       = s.f3d_Traffic.replaceDefaultBtnName;
                    mainBtnEventProxyGroup.baseButtonGroup[3].shadowLabel.text = s.f3d_Traffic.replaceDefaultBtnName;
                }

                if (s.f3d_HXFB.replaceDefaultBtnName != null && s.f3d_HXFB.replaceDefaultBtnName != "")
                {
                    mainBtnEventProxyGroup.baseButtonGroup[4].label.text       = s.f3d_HXFB.replaceDefaultBtnName;
                    mainBtnEventProxyGroup.baseButtonGroup[4].shadowLabel.text = s.f3d_HXFB.replaceDefaultBtnName;
                }
                //设置大场景相机的layer
                foreach (CameraUniversal c in s.cameraUniversalCenter.cameras)
                {
                    //0101 1111 1111 1111 1111 1111 1111 1111
                    //屏蔽29层
                    c.GetComponent <Camera>().cullingMask &= 0x5FFFFFFF;
                }
            }
            else if (s.sceneType == SenceInteractiveInfo.SceneType.Point360)
            {
            }
            else
            {
                /*
                 * //是否在AR模式下
                 * if (ARManager.isInARMode)
                 * {
                 *  arManager.findSenceInteractiveInfo = s;
                 * }
                 */

                //将户型单场景中的info复制到allHuXingTypeFromFinal
                foreach (HuXingType hFinal in hxGUI.hxSceneHuXingTypeFinal)
                {
                    if (s.huXingType.hxName == hFinal.hxName)
                    {
                        if (hFinal.displayName == "")
                        {
                            if (s.huXingType.displayName == "")
                            {
                                s.huXingType.displayName = s.huXingType.hxName;
                            }
                            hFinal.displayName = s.huXingType.displayName;
                        }

                        if (hFinal.leiXing == "")
                        {
                            hFinal.leiXing = s.huXingType.leiXing;
                        }
                        if (hFinal.introduction == "")
                        {
                            hFinal.introduction = s.huXingType.introduction;
                        }

                        hFinal.PMT                    = s.huXingType.PMT;
                        hFinal.proxyRoot              = s.huXingType.proxyRoot;
                        hFinal.hxMeshRoot             = s.huXingType.hxMeshRoot;
                        hFinal.rotOffset              = s.huXingType.rotOffset;
                        hFinal.nkCameraPosAndXYZcount = s.huXingType.nkCameraPosAndXYZcount;
                        hFinal.defaultMYFloorName     = s.huXingType.defaultMYFloorName;
                        hFinal.fastMovePointManager   = s.huXingType.fastMovePointManager;

                        //                     hFinal.hxAudioClip = s.huXingType.hxAudioClip;
                        //                     hFinal.cartoonType = s.huXingType.cartoonType;

                        /*
                         *                      if (s.huXingType.allFloor.Length != hFinal.allFloor.Length)
                         *                      {
                         *                          GlobalDebug.Addline("服务器的户型楼层数与模型设置的楼层不一致,请检查楼层设置是否正确且统一");
                         *                          Debug.LogError("服务器的户型楼层数与模型设置的楼层不一致,请检查楼层设置是否正确且统一");
                         *                          return;
                         *                      }
                         */
                        for (int i = 0; i < s.huXingType.allFloor.Length; i++)
                        {
                            for (int j = 0; j < hFinal.allFloor.Length; j++)
                            {
                                if (s.huXingType.allFloor[i].floorName == hFinal.allFloor[j].floorName + "F")
                                {
                                    //将必要的网络数据复制至到单个户型的info中
                                    if (hFinal.allFloor[j].displayName != "")
                                    {
                                        s.huXingType.allFloor[i].displayName = hFinal.allFloor[j].displayName;
                                    }
                                    else
                                    {
                                        if (s.huXingType.allFloor[i].displayName == "")
                                        {
                                            s.huXingType.allFloor[i].displayName = s.huXingType.allFloor[i].floorName;
                                        }
                                    }

                                    s.huXingType.allFloor[i].pmtUrl  = hFinal.allFloor[j].pmtUrl;
                                    s.huXingType.allFloor[i].pmtName = hFinal.allFloor[j].pmtName;
                                }
                            }

                            //默认关闭非承重墙
                            if (s.huXingType.allFloor[i].fczMesh != null)
                            {
                                s.huXingType.allFloor[i].fczMesh.gameObject.SetActive(false);
                            }
                        }

                        //把每楼层信息的复制到FinalHX中的楼层
                        hFinal.allFloor = s.huXingType.allFloor;
                    }
                }
            }

            if (s.huXingType.hxMeshRoot != null)
            {
                s.transform.position = s.huXingType.hxMeshRoot.position;
            }

            Debug.Log("HiddenScene");
            HiddenScene(s);

            senceInteractiveInfoGroup.Add(s);


            Debug.Log(s.sceneName + " SenceType: " + s.sceneType);
        }
    }
예제 #19
0
    public void ChangeInteractiveScene(SenceInteractiveInfo toInteractiveScene, bool disableCurrentSceneMesh)
    {
        if (toInteractiveScene == currentActiveSenceInteractiveInfo)
        {
            return;
        }

        if (currentActiveSenceInteractiveInfo != null && disableCurrentSceneMesh)
        {
            if (currentActiveSenceInteractiveInfo.sceneType == SenceInteractiveInfo.SceneType.大场景)
            {
                if (currentActiveSenceInteractiveInfo.meshRoot != null)
                {
                    currentActiveSenceInteractiveInfo.meshRoot.gameObject.SetActive(false);
                }
            }
            else
            {
                if (currentActiveSenceInteractiveInfo.huXingType.hxMeshRoot != null)
                {
                    currentActiveSenceInteractiveInfo.huXingType.hxMeshRoot.gameObject.SetActive(false);
                }
            }
        }

        globalCameraCenter.ChangeCamera(toInteractiveScene.cameraUniversalCenter.cameras[0], 0.0f);


        if (toInteractiveScene.sceneType == SenceInteractiveInfo.SceneType.大场景)
        {
            if (toInteractiveScene.meshRoot != null)
            {
                toInteractiveScene.meshRoot.gameObject.SetActive(true);
            }
            mainSenceInteractiveInfo = toInteractiveScene;

            defaultGUI.DisplayDefaultGUI();
        }
        else
        {
            if (toInteractiveScene.huXingType.hxMeshRoot != null)
            {
                toInteractiveScene.huXingType.hxMeshRoot.gameObject.SetActive(true);
            }
        }

        if (currentActiveSenceInteractiveInfo != null)
        {
            foreach (Canvas c in currentActiveSenceInteractiveInfo.GetComponentsInChildren <Canvas>(true))
            {
                c.gameObject.SetActive(false);
            }
        }

        foreach (Canvas c in toInteractiveScene.GetComponentsInChildren <Canvas>(true))
        {
            c.gameObject.SetActive(true);
        }

        currentActiveSenceInteractiveInfo = toInteractiveScene;
        globalCameraCenter.zbzOffset      = toInteractiveScene.cameraUniversalCenter.zbzOffset;
        zbz.cameraUniversalCenter         = toInteractiveScene.cameraUniversalCenter;
    }
예제 #20
0
 public void SetHXSceneAndHXFBScene(SenceInteractiveInfo a, SenceInteractiveInfo b)
 {
     hxScene   = a;
     hxfbScene = b;
 }
예제 #21
0
    public override void OnInspectorGUI()
    {
        SenceInteractiveInfo senceInteractiveInfo = (SenceInteractiveInfo)target;

        int propertyID = 0;

        SerializedObject   argsSerializedObject = new SerializedObject(target);
        SerializedProperty sp = argsSerializedObject.GetIterator();

        Undo.RecordObject(target, "SenceInteractiveInfo");
        EditorUtility.SetDirty(target);

        //第一步必须加这个
        sp.NextVisible(true);
        EditorGUILayout.PropertyField(sp, true);
        propertyID++;

        sp.NextVisible(false);
        EditorGUILayout.PropertyField(sp, true);
        propertyID++;

        sp.NextVisible(false);
        EditorGUILayout.PropertyField(sp, true);
        propertyID++;

        sp.NextVisible(false);
        EditorGUILayout.PropertyField(sp, true);
        propertyID++;

        sp.NextVisible(false);
        EditorGUILayout.PropertyField(sp, true);
        propertyID++;

        sp.NextVisible(false);
        EditorGUILayout.PropertyField(sp, true);
        propertyID++;

        sp.NextVisible(false);
        EditorGUILayout.PropertyField(sp, true);
        propertyID++;



        while (sp.NextVisible(false))
        {
            propertyID++;

            if (senceInteractiveInfo.sceneType == SenceInteractiveInfo.SceneType.大场景)
            {
                if (propertyID < 16)
                {
                    EditorGUILayout.PropertyField(sp, true);
                }
            }
//            else if (senceInteractiveInfo.sceneType == SenceInteractiveInfo.SceneType.Point360)
//            {
//                if (propertyID > 15)
//                {
//                    EditorGUILayout.PropertyField(sp, true);
//                }
//            }
            else
            {
                if (propertyID > 14)
                {
                    EditorGUILayout.PropertyField(sp, true);
                }
            }
        }

        argsSerializedObject.ApplyModifiedProperties();


        if (senceInteractiveInfo.sceneType != SenceInteractiveInfo.SceneType.大场景)
        {
            EditorGUILayout.Space();
            GUILayout.TextField("", GUILayout.MaxHeight(1));
            //GUI.color = new Color(1, 1, 0);

            EditorGUILayout.LabelField("All Floor 中的Floor Name参数设置时,请按以下方式设置,\n从最底层开始如-2F,-1F,1F,2F;\n屋顶一层请命名为WD;外墙体请命名为WQT;\n", GUILayout.Height(60));
        }
    }
예제 #22
0
    public void AddSenceInteractiveInfo(SenceInteractiveInfo s)
    {
//        Debug.Log(2222);
        s.sceneName = addSceneName;

        if (senceInteractiveInfoGroup == null)
        {
            senceInteractiveInfoGroup = new List <SenceInteractiveInfo>();
        }

        if (!senceInteractiveInfoGroup.Contains(s))
        {
            foreach (CameraUniversal c in s.cameraUniversalCenter.cameras)
            {
                c.InitlCameraInRuntime();
            }

            if (s.sceneType == SenceInteractiveInfo.SceneType.大场景)
            {
                //设置大场景相机的layer
                foreach (CameraUniversal c in s.cameraUniversalCenter.cameras)
                {
                    //0101 1111 1111 1111 1111 1111 1111 1111
                    //屏蔽29层
                    c.GetComponent <Camera>().cullingMask &= 0x5FFFFFFF;
                }
            }
            else
            {
                //将户型单场景中的info复制到allHuXingTypeFromFinal
                foreach (HuXingType hFinal in hxGUI.hxSceneHuXingTypeFinal)
                {
                    if (s.huXingType.hxName == hFinal.hxName)
                    {
                        if (hFinal.displayName == "")
                        {
                            if (s.huXingType.displayName == "")
                            {
                                s.huXingType.displayName = s.huXingType.hxName;
                            }

                            hFinal.displayName = s.huXingType.displayName;
                        }

                        if (hFinal.leiXing == "")
                        {
                            hFinal.leiXing = s.huXingType.leiXing;
                        }
                        if (hFinal.introduction == "")
                        {
                            hFinal.introduction = s.huXingType.introduction;
                        }

                        hFinal.PMT                    = s.huXingType.PMT;
                        hFinal.proxyRoot              = s.huXingType.proxyRoot;
                        hFinal.hxMeshRoot             = s.huXingType.hxMeshRoot;
                        hFinal.rotOffset              = s.huXingType.rotOffset;
                        hFinal.nkCameraPosAndXYZcount = s.huXingType.nkCameraPosAndXYZcount;
                        hFinal.defaultMYFloorName     = s.huXingType.defaultMYFloorName;

/*
 *                      if (s.huXingType.allFloor.Length != hFinal.allFloor.Length)
 *                      {
 *                          GlobalDebug.Addline("服务器的户型楼层数与模型设置的楼层不一致,请检查楼层设置是否正确且统一");
 *                          Debug.LogError("服务器的户型楼层数与模型设置的楼层不一致,请检查楼层设置是否正确且统一");
 *                          return;
 *                      }
 */
                        for (int i = 0; i < s.huXingType.allFloor.Length; i++)
                        {
                            for (int j = 0; j < hFinal.allFloor.Length; j++)
                            {
                                if (s.huXingType.allFloor[i].floorName == hFinal.allFloor[j].floorName + "F")
                                {
                                    //将必要的网络数据复制至到单个户型的info中
                                    if (hFinal.allFloor[j].displayName != "")
                                    {
                                        s.huXingType.allFloor[i].displayName = hFinal.allFloor[j].displayName;
                                    }
                                    else
                                    {
                                        if (s.huXingType.allFloor[i].displayName == "")
                                        {
                                            s.huXingType.allFloor[i].displayName = s.huXingType.allFloor[i].floorName;
                                        }
                                    }

                                    s.huXingType.allFloor[i].pmtUrl  = hFinal.allFloor[j].pmtUrl;
                                    s.huXingType.allFloor[i].pmtName = hFinal.allFloor[j].pmtName;
                                }
                            }

                            //默认关闭非承重墙
                            if (s.huXingType.allFloor[i].fczMesh != null)
                            {
                                s.huXingType.allFloor[i].fczMesh.gameObject.SetActive(false);
                            }
                        }

                        //把每楼层信息的复制到FinalHX中的楼层
                        hFinal.allFloor = s.huXingType.allFloor;
                    }
                }
            }

            if (s.huXingType.hxMeshRoot != null)
            {
                s.transform.position = s.huXingType.hxMeshRoot.position;
            }

            HiddenScene(s);

            senceInteractiveInfoGroup.Add(s);
        }
    }