合并
This commit is contained in:
commit
ea54397753
@ -51,12 +51,12 @@ public class Show3DCamera : MonoBehaviour
|
||||
// 初始化相机位置
|
||||
this.inputRect = inputRect;
|
||||
this.targetPos = target.transform.position;
|
||||
this.rotateSpeed = rotateSpeed;
|
||||
this.moveSpeed = moveSpeed;
|
||||
this.distance = distance;
|
||||
this.distanceMin = distanceMin;
|
||||
this.distanceMax = distanceMax;
|
||||
this.pitchMinMax = new Vector2(pitchMin, pitchMax);
|
||||
//this.rotateSpeed = rotateSpeed;
|
||||
//this.moveSpeed = moveSpeed;
|
||||
//this.distance = distance;
|
||||
//this.distanceMin = distanceMin;
|
||||
//this.distanceMax = distanceMax;
|
||||
//this.pitchMinMax = new Vector2(pitchMin, pitchMax);
|
||||
// 初始化相机位置
|
||||
offset = new Vector3(0, 0, -distance);
|
||||
|
||||
@ -73,6 +73,32 @@ public class Show3DCamera : MonoBehaviour
|
||||
|
||||
|
||||
|
||||
public void ResetCamera(Transform target, RectTransform inputRect = null, bool isRenderTexture = true)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
Debug.LogError("Target is not assigned!");
|
||||
return;
|
||||
}
|
||||
|
||||
yaw = 0;
|
||||
pitch = 0;
|
||||
// 初始化相机位置
|
||||
this.inputRect = inputRect;
|
||||
this.targetPos = target.transform.position;
|
||||
// 初始化相机位置
|
||||
offset = new Vector3(0, 0, -distance);
|
||||
|
||||
if (isRenderTexture)
|
||||
{
|
||||
self.targetTexture = texture;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.targetTexture = null;
|
||||
}
|
||||
UpdateCameraPosition(-1);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
@ -57,6 +57,7 @@ namespace QFramework.Example
|
||||
Dictionary<string, BodyListItem> bodyListIndex = new Dictionary<string, BodyListItem>();
|
||||
protected override void OnInit(IUIData uiData = null)
|
||||
{
|
||||
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuithandler).UnRegisterWhenGameObjectDestroyed(this);
|
||||
DragBtn.onValueChanged.AddListener(isOn =>
|
||||
{
|
||||
DragBtn.transform.Find("SubBtns").gameObject.SetActive(isOn);
|
||||
@ -149,6 +150,10 @@ namespace QFramework.Example
|
||||
|
||||
}
|
||||
|
||||
private void OnModuleQuithandler(OnModuleQuit quit)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
private void OnUIDrawClose()
|
||||
{
|
||||
@ -244,9 +249,7 @@ namespace QFramework.Example
|
||||
|
||||
public void ResetCamera(float moveTime)
|
||||
{
|
||||
//Show3DCamera.instance.Set(root.transform, distance: 5, isRenderTexture: false, moveTime: moveTime, pitchMin: -80);
|
||||
Show3DCamera.instance.Set(root.transform, distance: 5, isRenderTexture: false, moveTime: moveTime, pitchMin: -80);
|
||||
|
||||
Show3DCamera.instance.ResetCamera(root.transform);
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
|
||||
@ -18,6 +18,7 @@ namespace QFramework.Example
|
||||
float bgH;
|
||||
protected override void OnInit(IUIData uiData = null)
|
||||
{
|
||||
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuithandler).UnRegisterWhenGameObjectDestroyed(this);
|
||||
bgH = Content.sizeDelta.y;
|
||||
Group.onValueChanged.AddListener(isOn =>
|
||||
{
|
||||
@ -122,6 +123,11 @@ namespace QFramework.Example
|
||||
|
||||
}
|
||||
|
||||
private void OnModuleQuithandler(OnModuleQuit quit)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
public void RefreshTipPath()
|
||||
{
|
||||
ListContent.RemoveAllChildren();
|
||||
|
||||
@ -4,6 +4,7 @@ using XMLTool;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -204,6 +205,7 @@ namespace QFramework.Example
|
||||
DOTweenAnimation contentAnim;
|
||||
protected override void OnInit(IUIData uiData = null)
|
||||
{
|
||||
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuithandler).UnRegisterWhenGameObjectDestroyed(this);
|
||||
contentAnim = RootContent.GetComponent<DOTweenAnimation>();
|
||||
// please add init code here
|
||||
Close.onClick.AddListener(() =>
|
||||
@ -233,7 +235,10 @@ namespace QFramework.Example
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void OnModuleQuithandler(OnModuleQuit quit)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
|
||||
@ -15,6 +15,7 @@ namespace QFramework.Example
|
||||
private bool isObjectHit; // 标记是否有物体被击中
|
||||
protected override void OnInit(IUIData uiData = null)
|
||||
{
|
||||
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuithandler).UnRegisterWhenGameObjectDestroyed(this);
|
||||
mData = uiData as UIBody3DMouseData ?? new UIBody3DMouseData();
|
||||
dragItem = Content.GetComponent<UIDragItem>();
|
||||
|
||||
@ -31,6 +32,11 @@ namespace QFramework.Example
|
||||
});
|
||||
}
|
||||
|
||||
private void OnModuleQuithandler(OnModuleQuit quit)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
private void OnEndDrag()
|
||||
{
|
||||
Show3DCamera.instance.lockMove = false;
|
||||
|
||||
@ -405,7 +405,8 @@ namespace XMLTool
|
||||
Name = bodyElement.Attribute("name")?.Value,
|
||||
Path = bodyElement.Attribute("path")?.Value,
|
||||
Tip = bodyElement.Attribute("tip")?.Value,
|
||||
Audio = bodyElement.Attribute("audio")?.Value
|
||||
Audio = bodyElement.Attribute("audio")?.Value,
|
||||
FocusDistance = bodyElement.Attribute("FocusDistance")?.Value
|
||||
};
|
||||
|
||||
var isShow = bodyElement.Attribute("isShow");
|
||||
|
||||
@ -380,4 +380,96 @@
|
||||
|
||||
</Module>
|
||||
|
||||
|
||||
|
||||
|
||||
<Body3D>
|
||||
<Body name="头颈" icon="" path="Ren_NEW/SM_GuGe/skull" FocusDistance="1" audio="" tip="">
|
||||
<Body name="骨骼系统" path="Ren_NEW/SM_GuGe" >
|
||||
<Body name="左肋骨" path="Ren_NEW/SM_GuGe/upper_limb_bone">
|
||||
<Body name="左肋" path="Ren_NEW/SM_GuGe/upper_limb_bone/Left_upper_limb_bones">
|
||||
<Body name="左一" path="Ren_NEW/SM_GuGe/upper_limb_bone/Left_upper_limb_bones/Left_free_upper_limb_bones" tip="左一肋骨描述">
|
||||
<ObjectToggle>
|
||||
<Color isOn="0,255,255" isOff="255,255,255"></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
<Body name="左二" path="Ren/Tou/GuGe/LeiGu/ZuoLei/2" tip="左二肋骨描述">
|
||||
<ObjectToggle>
|
||||
<Color isOn="0,255,255" isOff="255,255,255"></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
</Body>
|
||||
|
||||
|
||||
|
||||
<Body name="右肋" path="Ren/Tou/GuGe/LeiGu/YouLei">
|
||||
<Body name="右一" path="Ren/Tou/GuGe/LeiGu/YouLei/1" tip="7右一肋骨描述">
|
||||
<ObjectToggle>
|
||||
<Color isOn="0,255,255" isOff="255,255,255"></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
<Body name="右二" path="Ren/Tou/GuGe/LeiGu/YouLei/2" tip="右二肋骨描述">
|
||||
<ObjectToggle>
|
||||
<Color isOn="0,255,255" isOff="255,255,255"></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
</Body>
|
||||
</Body>
|
||||
</Body>
|
||||
<Body name="皮肤系统" path="Ren/Tou/PiFu" isShow="false">
|
||||
<Body name="肋骨" path="Ren/Tou/PiFu/LeiGu">
|
||||
<Body name="左肋" path="Ren/Tou/PiFu/LeiGu/ZuoLei">
|
||||
<Body name="左一" path="Ren/Tou/PiFu/LeiGu/ZuoLei/1"></Body>
|
||||
<Body name="左二" path="Ren/Tou/PiFu/LeiGu/ZuoLei/2"></Body>
|
||||
</Body>
|
||||
<Body name="右肋" path="Ren/Tou/PiFu/LeiGu/YouLei">
|
||||
<Body name="右一" path="Ren/Tou/PiFu/LeiGu/YouLei/1"></Body>
|
||||
<Body name="右二" path="Ren/Tou/PiFu/LeiGu/YouLei/2"></Body>
|
||||
</Body>
|
||||
</Body>
|
||||
</Body>
|
||||
<Body name="肌肉" isBodyList="true" path="Ren/Tou/JiRou">
|
||||
<Body name="111" path="Ren/Tou/JiRou/1">
|
||||
<ObjectToggle>
|
||||
<Color></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
<Body name="动脉" path="Ren_NEW/SM_DongMai">
|
||||
<ObjectToggle>
|
||||
<Color></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
<Body name="静脉" path="Ren/Tou/JiRou/3">
|
||||
<ObjectToggle>
|
||||
<Color></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
</Body>
|
||||
|
||||
<Body name="神经" isBodyList="true">
|
||||
<Body name="aaa" path="Ren/Tou/ShenJing/1">
|
||||
<ObjectToggle>
|
||||
<Color></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
<Body name="bbb" path="Ren/Tou/ShenJing/2">
|
||||
<ObjectToggle>
|
||||
<Color></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
<Body name="ccc" path="Ren/Tou/ShenJing/3">
|
||||
<ObjectToggle>
|
||||
<Color></Color>
|
||||
</ObjectToggle>
|
||||
</Body>
|
||||
</Body>
|
||||
|
||||
</Body>
|
||||
|
||||
</Body3D>
|
||||
|
||||
|
||||
|
||||
</示例>
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user