From f571fd527993ddc76fd90bc4b78c9f90f993caf6 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 28 Feb 2025 14:58:52 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Controller/ScoreController.cs | 4 ++++ Assets/Scripts/UI/UITools.cs | 1 + Assets/Scripts/Xml/XmlParser.cs | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Controller/ScoreController.cs b/Assets/Scripts/Controller/ScoreController.cs index b80eb017..c7616f4f 100644 --- a/Assets/Scripts/Controller/ScoreController.cs +++ b/Assets/Scripts/Controller/ScoreController.cs @@ -83,6 +83,10 @@ public class ScoreController : MonoSingleton scoreDict[key].value = 0; } } + else + { + Debug.LogError("ûҵ ֵ㣺" + key); + } } diff --git a/Assets/Scripts/UI/UITools.cs b/Assets/Scripts/UI/UITools.cs index e4f32ffb..17f4273c 100644 --- a/Assets/Scripts/UI/UITools.cs +++ b/Assets/Scripts/UI/UITools.cs @@ -42,6 +42,7 @@ namespace QFramework.Example protected override void OnOpen(IUIData uiData = null) { + mData = uiData as UIToolsData ?? new UIToolsData(); TypeEventSystem.Global.Register(OnStepChanged).UnRegisterWhenDisabled(gameObject); if (mData.totalScore > 0) { diff --git a/Assets/Scripts/Xml/XmlParser.cs b/Assets/Scripts/Xml/XmlParser.cs index d601aa03..4526393c 100644 --- a/Assets/Scripts/Xml/XmlParser.cs +++ b/Assets/Scripts/Xml/XmlParser.cs @@ -265,7 +265,7 @@ namespace XMLTool // ģ module.type = moduleElement.Element("Type")?.Value; module.ModuleName = moduleElement.Element("Name")?.Value; - module.Descript = moduleElement.Element("Descript")?.Value; + module.Descript = moduleElement.Element("Descript")?.Value.Trim(); module.Scene = moduleElement.Element("Scene")?.Value; // 豸 From 34fffe6daa549a60437b224387a9936bdfa34c05 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 28 Feb 2025 17:30:07 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Art/UIPrefab/UITipWindow.prefab | 4 ++-- Assets/Scripts/TimeScaleController.cs | 12 ++++-------- Assets/Scripts/UI/UICameraSwitch.cs | 9 +++++++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Assets/Art/UIPrefab/UITipWindow.prefab b/Assets/Art/UIPrefab/UITipWindow.prefab index 2c15b99d..ada0c7aa 100644 --- a/Assets/Art/UIPrefab/UITipWindow.prefab +++ b/Assets/Art/UIPrefab/UITipWindow.prefab @@ -652,8 +652,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Padding: - m_Left: 0 - m_Right: 0 + m_Left: 20 + m_Right: 20 m_Top: 20 m_Bottom: 0 m_ChildAlignment: 1 diff --git a/Assets/Scripts/TimeScaleController.cs b/Assets/Scripts/TimeScaleController.cs index 346d9436..00b299e2 100644 --- a/Assets/Scripts/TimeScaleController.cs +++ b/Assets/Scripts/TimeScaleController.cs @@ -39,12 +39,12 @@ public class TimeScaleController : MonoBehaviour } if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) { - if (Input.GetKeyDown(KeyCode.Q)) + if (Input.GetKeyDown(KeyCode.C)) { string str = string.Empty; str = $"{gameObject.transform.position}|{gameObject.transform.eulerAngles}"; #if UNITY_WEBGL - Debug.Log("Ctrl + Q £"); + Debug.Log("Ctrl + Q £"+str); CopyToClipboard(str); #elif UNITY_STANDALONE_WIN && !UNITY_EDITOR // ʾ @@ -53,18 +53,14 @@ public class TimeScaleController : MonoBehaviour #endif } #if UNITY_STANDALONE_WIN &&!UNITY_EDITOR - if (Input.GetKeyDown(KeyCode.E)) + if (Input.GetKeyDown(KeyCode.V)) { string tmp = GUIUtility.systemCopyBuffer; - Debug.LogError("ǰ壺" + tmp); + Debug.Log("ǰ壺" + tmp); tmp = tmp.Replace("(", ""); - Debug.LogError(tmp); tmp = tmp.Replace(")", ""); - Debug.LogError(tmp); var datas = tmp.Split('|'); - Debug.LogError(datas[0]); - Debug.LogError(datas[1]); gameObject.transform.position = Utility.GetVector3FromStrArray(datas[0]); gameObject.transform.eulerAngles = Utility.GetVector3FromStrArray(datas[1]); } diff --git a/Assets/Scripts/UI/UICameraSwitch.cs b/Assets/Scripts/UI/UICameraSwitch.cs index e63756f0..89079724 100644 --- a/Assets/Scripts/UI/UICameraSwitch.cs +++ b/Assets/Scripts/UI/UICameraSwitch.cs @@ -21,6 +21,7 @@ namespace QFramework.Example } public partial class UICameraSwitch : UIPanel { + bool firstFreeMove = true; protected override void OnInit(IUIData uiData = null) { TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); @@ -114,6 +115,14 @@ namespace QFramework.Example { Near.isOn = false; Far.isOn = false; + if (firstFreeMove) + { + UITipWindowData data = new UITipWindowData(); + data.txt = "лƶӽǣ½ǰťɻصԤӽǡ"; + data.btns.Add(new UITipWindowData.ItemData() { txt = "ȷ" }); + UIKit.OpenPanelAsync(canvasLevel: UILevel.PopUI, uiData: data).ToAction().StartGlobal(); + firstFreeMove = false; + } } } From 32d905a8ea3a8c890cf02836fab972f248e5a4bf Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 28 Feb 2025 18:28:19 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIInstruction.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/UI/UIInstruction.cs b/Assets/Scripts/UI/UIInstruction.cs index cd7b57a3..84ba68df 100644 --- a/Assets/Scripts/UI/UIInstruction.cs +++ b/Assets/Scripts/UI/UIInstruction.cs @@ -13,6 +13,7 @@ namespace QFramework.Example public partial class UIInstruction : UIPanel { bool isNo = false; + bool isOperation = false; protected override void OnInit(IUIData uiData = null) { TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); @@ -46,8 +47,17 @@ namespace QFramework.Example }); ConfirmBtn.onClick.AddListener(() => { - Hide(); - isNo = NoToggle.isOn; + if (isOperation == false) + { + Operation.isOn = true; + isOperation = true; + } + else + { + Hide(); + isNo = NoToggle.isOn; + + } }); From 3efaf5977da25fa3b56cc5e751ce79c9294b43ca Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 28 Feb 2025 18:41:05 +0800 Subject: [PATCH 4/5] =?UTF-8?q?UI=E9=9A=90=E8=97=8F=E5=8F=91=E5=87=BA?= =?UTF-8?q?=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIInstruction.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/Scripts/UI/UIInstruction.cs b/Assets/Scripts/UI/UIInstruction.cs index 84ba68df..2339eea9 100644 --- a/Assets/Scripts/UI/UIInstruction.cs +++ b/Assets/Scripts/UI/UIInstruction.cs @@ -92,6 +92,7 @@ namespace QFramework.Example protected override void OnHide() { mData = null; + StringEventSystem.Global.Send(this.GetType().Name + "Hide"); } protected override void OnClose() From 3bc97db54d1a1b225e7c6a9b82d1f9182043778f Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 28 Feb 2025 19:22:44 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BC=98=E5=8C=96pc=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Tools/AsposeHelper.cs | 12 +++++++----- Assets/Scripts/UI/UIScore.cs | 7 ++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Tools/AsposeHelper.cs b/Assets/Scripts/Tools/AsposeHelper.cs index db787fc5..f0bafae1 100644 --- a/Assets/Scripts/Tools/AsposeHelper.cs +++ b/Assets/Scripts/Tools/AsposeHelper.cs @@ -5,14 +5,14 @@ using System.IO; using UnityEngine; using System.Windows.Forms; using Newtonsoft.Json.Linq; +using System; public class AsposeHelper : MonoBehaviour { - public static void Writer(string json) + public static void Writer(string json, Action callback = null) { - Debug.LogError(File.Exists(Global.reportDemoPath)); // Wordĵ Document doc = new Document(Global.reportDemoPath); @@ -25,21 +25,23 @@ public class AsposeHelper : MonoBehaviour doc.Range.Replace($"{{{key}}}", $"{value}", new FindReplaceOptions()); } // 滻ı - SaveWithDialog(doc); + SaveWithDialog(doc, callback); //Debug.Log("ĵɣĵѱ浽: " + outputFilePath); } - private static void SaveWithDialog(Document doc) + private static void SaveWithDialog(Document doc, Action callback) { SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "Wordĵ|*.docx"; - if (dialog.ShowDialog() == DialogResult.OK) + var result = dialog.ShowDialog(); + if (result == DialogResult.OK) { doc.Save(dialog.FileName); } + callback?.Invoke(result); } } diff --git a/Assets/Scripts/UI/UIScore.cs b/Assets/Scripts/UI/UIScore.cs index 68ff27c3..1b8d5ea4 100644 --- a/Assets/Scripts/UI/UIScore.cs +++ b/Assets/Scripts/UI/UIScore.cs @@ -36,7 +36,12 @@ namespace QFramework.Example }); loader.LoadAsync(); #elif UNITY_STANDALONE_WIN - AsposeHelper.Writer(GetScoreDataJson()); + DownLoad.interactable = false; + AsposeHelper.Writer(GetScoreDataJson(), result => + { + Debug.LogError("111"); + DownLoad.interactable = true; + }); #endif