From bb57c527b76903532cca14501f044992c592d39e Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Tue, 31 Dec 2024 13:16:06 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Actions/AnimationAction.cs | 43 ++++++++++++++--------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/Assets/Scripts/Actions/AnimationAction.cs b/Assets/Scripts/Actions/AnimationAction.cs index f2cc26a3..5a9691af 100644 --- a/Assets/Scripts/Actions/AnimationAction.cs +++ b/Assets/Scripts/Actions/AnimationAction.cs @@ -46,30 +46,39 @@ namespace QFramework GameObject obj = Utility.FindObj(path); if (obj != null) { - anim = obj.GetComponent(); + try + { + anim = obj.GetComponent(); - if (string.IsNullOrEmpty(frame) == false && frame != "-1") - { - int curFrame = 0; - int.TryParse(frame, out curFrame); - anim[animName].time = curFrame / anim.clip.frameRate; - anim[animName].speed = 0; - anim.Play(animName); - this.Finish(); - } - else - { - float curSpeed = 1; - if (string.IsNullOrEmpty(speed)==false) + if (string.IsNullOrEmpty(frame) == false && frame != "-1") { - float.TryParse(speed, out curSpeed); + int curFrame = 0; + int.TryParse(frame, out curFrame); + anim[animName].time = curFrame / anim.clip.frameRate; + anim[animName].speed = 0; + anim.Play(animName); + this.Finish(); + } + else + { + float curSpeed = 1; + if (string.IsNullOrEmpty(speed) == false) + { + float.TryParse(speed, out curSpeed); + } + anim[animName].speed = curSpeed; + anim.Play(animName); } - anim[animName].speed = curSpeed; - anim.Play(animName); } + catch (Exception) + { + Debug.LogError($"{path} Ŷ {animName} "); + } + } else { + Debug.LogError("δҵ·" + path); this.Finish(); } } From b0bda8b7d450b85ba5b180c81f0f8853f7c7e0ff Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Tue, 31 Dec 2024 13:37:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9UIPoint=E5=88=B0Pop?= =?UTF-8?q?=E5=B1=82=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Actions/PointQuestionAction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Actions/PointQuestionAction.cs b/Assets/Scripts/Actions/PointQuestionAction.cs index d9b4210d..ebad4900 100644 --- a/Assets/Scripts/Actions/PointQuestionAction.cs +++ b/Assets/Scripts/Actions/PointQuestionAction.cs @@ -35,7 +35,7 @@ namespace QFramework { UIPointQuestionData data = new UIPointQuestionData(); data.paths = paths; - UIKit.OpenPanelAsync(uiData: data).ToAction().StartGlobal(() => this.Finish()); + UIKit.OpenPanelAsync(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish()); } public void OnExecute(float dt) From 2818818f0313ba77b987164969dd459fb7a5d025 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Tue, 31 Dec 2024 13:54:29 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIPointQuestion.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/UI/UIPointQuestion.cs b/Assets/Scripts/UI/UIPointQuestion.cs index 49c43b95..f9cb7d81 100644 --- a/Assets/Scripts/UI/UIPointQuestion.cs +++ b/Assets/Scripts/UI/UIPointQuestion.cs @@ -28,6 +28,8 @@ namespace QFramework.Example protected override void OnOpen(IUIData uiData = null) { mData = uiData as UIPointQuestionData ?? new UIPointQuestionData(); + + Content.RemoveAllChildren(); var paths = mData.paths.Split(','); for (int i = 0; i < paths.Length; i++) { @@ -60,11 +62,11 @@ namespace QFramework.Example protected override void OnHide() { + pointMap.Clear(); } protected override void OnClose() { - pointMap.Clear(); } } } From c25830a67084d68f2a6b1a5f63a960bd8f4ca652 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Tue, 31 Dec 2024 16:17:48 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UICameraSwitch.cs | 48 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/Assets/Scripts/UI/UICameraSwitch.cs b/Assets/Scripts/UI/UICameraSwitch.cs index 7890ac3b..532f5fe4 100644 --- a/Assets/Scripts/UI/UICameraSwitch.cs +++ b/Assets/Scripts/UI/UICameraSwitch.cs @@ -16,7 +16,7 @@ namespace QFramework.Example public Vector3 normalRot; public float nearTime; public float normalTime; - public bool isNear = false; + public bool isNear; } public partial class UICameraSwitch : UIPanel @@ -60,30 +60,28 @@ namespace QFramework.Example mData = uiData as UICameraSwitchData ?? new UICameraSwitchData(); - - - if (mData.isNear) - { - if (Near.isOn == false) - { - Near.isOn = true; - } - else - { - SetNear(); - } - } - else - { - if (Far.isOn == false) - { - Far.isOn = true; - } - else - { - SetNormal(); - } - } + //if (mData.isNear) + //{ + // if (Near.isOn == false) + // { + // Near.isOn = true; + // } + // else + // { + // SetNear(); + // } + //} + //else + //{ + // if (Far.isOn == false) + // { + // Far.isOn = true; + // } + // else + // { + // SetNormal(); + // } + //} } protected override void OnShow()