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 @@ - +