From 3e4d87b0cad21f26354056345e6e649c4240dbee Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Tue, 31 Dec 2024 16:31:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=8F=8D=E9=A6=88=E4=BF=AE?= =?UTF-8?q?=E6=94=B9UI=E7=BB=84=E4=BB=B6=E4=BD=BF=E7=94=A8=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Actions/CameraSwitchAction.cs | 9 ------ Assets/Scripts/UI/UICameraSwitch.cs | 32 ++++---------------- Assets/Scripts/Xml/XmlParser.cs | 9 ------ Doc/Xml配置文档.xml | 4 +-- 4 files changed, 8 insertions(+), 46 deletions(-) diff --git a/Assets/Scripts/Actions/CameraSwitchAction.cs b/Assets/Scripts/Actions/CameraSwitchAction.cs index 82fbcb98..a4993937 100644 --- a/Assets/Scripts/Actions/CameraSwitchAction.cs +++ b/Assets/Scripts/Actions/CameraSwitchAction.cs @@ -64,15 +64,6 @@ namespace QFramework data.normalRot = Utility.GetVector3FromStrArray(datas["normalRot"]); } - if (datas.ContainsKey("isNear") == false) - { - data.NotRun = true; - } - else - { - data.NotRun = false; - bool.TryParse(datas["isNear"], out data.isNear); - } float.TryParse(datas["nearTime"], out data.nearTime); float.TryParse(datas["normalTime"], out data.normalTime); diff --git a/Assets/Scripts/UI/UICameraSwitch.cs b/Assets/Scripts/UI/UICameraSwitch.cs index 60f36643..dd2893cf 100644 --- a/Assets/Scripts/UI/UICameraSwitch.cs +++ b/Assets/Scripts/UI/UICameraSwitch.cs @@ -16,8 +16,6 @@ namespace QFramework.Example public Vector3 normalRot; public float nearTime; public float normalTime; - public bool isNear; - public bool NotRun; } public partial class UICameraSwitch : UIPanel @@ -60,32 +58,14 @@ namespace QFramework.Example { mData = uiData as UICameraSwitchData ?? new UICameraSwitchData(); - if (mData.NotRun==false) + if (Near.isOn) { - if (mData.isNear) - { - if (Near.isOn == false) - { - Near.isOn = true; - } - else - { - SetNear(); - } - } - else - { - if (Far.isOn == false) - { - Far.isOn = true; - } - else - { - SetNormal(); - } - } + SetNear(); + } + if (Far.isOn) + { + SetNormal(); } - } protected override void OnShow() diff --git a/Assets/Scripts/Xml/XmlParser.cs b/Assets/Scripts/Xml/XmlParser.cs index 3fcc3afd..c7fb8bc0 100644 --- a/Assets/Scripts/Xml/XmlParser.cs +++ b/Assets/Scripts/Xml/XmlParser.cs @@ -655,15 +655,6 @@ namespace XMLTool { act.args.Add("normalTime", "0"); } - XAttribute isNear = action.Attribute("isNear"); - if (isNear != null) - { - act.args.Add("isNear", isNear.Value); - } - else - { - act.args.Add("isNear", "false"); - } newAction = act; } break; diff --git a/Doc/Xml配置文档.xml b/Doc/Xml配置文档.xml index 06d2e0f3..3e3e6975 100644 --- a/Doc/Xml配置文档.xml +++ b/Doc/Xml配置文档.xml @@ -49,9 +49,9 @@ - +