Exemple #1
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();
    }
Exemple #2
0
 public void EnterHuXing()
 {
     buildScrollMenu.GetComponentInParent <Transform>().DOLocalMoveY(-700, 0.3f);
     unitScrollMenu.GetComponentInParent <Transform>().DOLocalMoveY(-700, 0.3f);
     hxInstanceScrollMenu.GetComponentInParent <Transform>().DOLocalMoveY(-700, 0.3f);
 }