public HuXingInstance[] GetHXInstance(int inFangJianHao) { hxName = transform.name; louHao = transform.parent.GetComponent <Building>().louHaoNo; if (autoFangJianHao) { fangJianHao = inFangJianHao; } int count = 0; int currentFLoor = 0; for (int i = startFloor; i <= endFloor; i += eachFloorAdd) { count++; } genHXInstance = new List <HuXingInstance>(); for (int i = startFloor; i <= endFloor; i += eachFloorAdd) { HuXingInstance h = new HuXingInstance(); hxName = gameObject.name; h.hxName = hxName; h.isMirrorHX = isMirrorHX; h.yRotOffset = yRotOffset; h.louHao = louHao; h.unit = unit; h.louCeng = startFloor + currentFLoor; h.fangJianHao = fangJianHao; h.unit = unit; h.position = transform.position + new Vector3(0, eachFloorHeight * (i - startFloor), 0); h.eulerAngles = transform.eulerAngles; h.scale = transform.lossyScale; currentFLoor += eachFloorNameAdd; h.Genid(); genHXInstance.Add(h); } return(genHXInstance.ToArray()); }
void RenderXFThumbnail(HuXingInstance h) { selectMat.SetColor("_Color", new Color(0, 0, 0, 0.8f)); selectMeshProxy.position = h.position; selectMeshProxy.eulerAngles = h.eulerAngles; selectMeshProxy.localScale = h.scale; currentSelectSenceInteractiveInfo.huXingType.hxMeshRoot.transform.position = h.position; currentSelectSenceInteractiveInfo.huXingType.hxMeshRoot.transform.eulerAngles = h.eulerAngles; // currentSelectSenceInteractiveInfo.huXingType.hxMeshRoot.transform.localScale = h.scale; senceInteractiveInfoGroup[0].cameraUniversalCenter.cameras[0].GetComponent <Camera>().targetTexture = thumbnail; senceInteractiveInfoGroup[0].cameraUniversalCenter.cameras[0].EnableCamera(); senceInteractiveInfoGroup[0].cameraUniversalCenter.cameras[0].SetCameraPositionAndXYZCountAllArgs(h.position.x.ToString(), h.position.y.ToString(), h.position.z.ToString(), "25", (h.eulerAngles.y + 180).ToString(), "60", 0); senceInteractiveInfoGroup[0].cameraUniversalCenter.cameras[0].GetComponent <Camera>().Render(); senceInteractiveInfoGroup[0].cameraUniversalCenter.cameras[0].DisableCamera(); senceInteractiveInfoGroup[0].cameraUniversalCenter.cameras[0].GetComponent <Camera>().targetTexture = null; }
void RenderXFThumbnail(HuXingInstance h, bool isThumbnailZoomIn) { selectMat.SetColor("_Color", new Color(0, 0, 0, 0.8f)); selectMeshProxy.position = h.position; selectMeshProxy.eulerAngles = h.eulerAngles; selectMeshProxy.localScale = h.scale; // hxScene.huXingType.hxMeshRoot.transform.position = h.position; hxScene.huXingType.hxMeshRoot.transform.DOMove(h.position, 0.3f); hxScene.huXingType.hxMeshRoot.transform.eulerAngles = new Vector3(h.eulerAngles.x, h.eulerAngles.y + h.yRotOffset, h.eulerAngles.z); //currentSelectSenceInteractiveInfo.huXingType.hxMeshRoot.transform.localScale = h.scale; if (!isThumbnailZoomIn) { hxfbScene.cameraUniversalCenter.cameras[0].SetCameraPositionAndXYZCountAllArgs(h.position.x.ToString(), h.position.y.ToString(), h.position.z.ToString(), "25", (h.eulerAngles.y + 180).ToString(), "25", 0.0f); sceneInteractiveManger.RenderSenceThumbnail(hxfbScene, hxfbScene.cameraUniversalCenter.cameras[0]); selectMat.SetFloat("_alphaSin", 0.0f); } else { hxfbScene.cameraUniversalCenter.cameras[0].SetCameraPositionAndXYZCountAllArgs(h.position.x.ToString(), h.position.y.ToString(), h.position.z.ToString(), "25", (h.eulerAngles.y + 180).ToString(), "", 0); selectMat.SetFloat("_alphaSin", 0.8f); } }