Merge remote-tracking branch 'origin/master' into LouDi_Pig
This commit is contained in:
commit
728ba2b6bd
@ -63,7 +63,10 @@ namespace QFramework
|
|||||||
data.normalPos = Utility.GetVector3FromStrArray(datas["normalPos"]);
|
data.normalPos = Utility.GetVector3FromStrArray(datas["normalPos"]);
|
||||||
data.normalRot = Utility.GetVector3FromStrArray(datas["normalRot"]);
|
data.normalRot = Utility.GetVector3FromStrArray(datas["normalRot"]);
|
||||||
}
|
}
|
||||||
|
if (datas.ContainsKey("isOn"))
|
||||||
|
{
|
||||||
|
data.isOn = datas["isOn"];
|
||||||
|
}
|
||||||
float.TryParse(datas["nearTime"], out data.nearTime);
|
float.TryParse(datas["nearTime"], out data.nearTime);
|
||||||
float.TryParse(datas["normalTime"], out data.normalTime);
|
float.TryParse(datas["normalTime"], out data.normalTime);
|
||||||
|
|
||||||
|
|||||||
11
Assets/Scripts/Editor/SetReadWrite.cs.meta
Normal file
11
Assets/Scripts/Editor/SetReadWrite.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a1465669937f2bd41bb9445a4ad56e2b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -46,7 +46,10 @@ public class DeviceItem : MonoBehaviour
|
|||||||
{
|
{
|
||||||
bool isActive = true;
|
bool isActive = true;
|
||||||
bool.TryParse(obj[0], out isActive);
|
bool.TryParse(obj[0], out isActive);
|
||||||
gameObject.GetComponent<HighlightTrigger>().enabled = isActive;
|
if (obj.Length == 1 || (obj.Length > 1 && obj[1] == device.Name))
|
||||||
|
{
|
||||||
|
gameObject.GetComponent<HighlightTrigger>().enabled = isActive;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,6 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
mData = uiData as UIBtnsData ?? new UIBtnsData();
|
mData = uiData as UIBtnsData ?? new UIBtnsData();
|
||||||
// please add init code here
|
// please add init code here
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,6 +28,7 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(gameObject);
|
||||||
mData = uiData as UIBtnsData ?? new UIBtnsData();
|
mData = uiData as UIBtnsData ?? new UIBtnsData();
|
||||||
BtnContent.RemoveAllChildren();
|
BtnContent.RemoveAllChildren();
|
||||||
foreach (var item in mData.btns)
|
foreach (var item in mData.btns)
|
||||||
|
|||||||
@ -16,6 +16,7 @@ namespace QFramework.Example
|
|||||||
public Vector3 normalRot;
|
public Vector3 normalRot;
|
||||||
public float nearTime;
|
public float nearTime;
|
||||||
public float normalTime;
|
public float normalTime;
|
||||||
|
public string isOn;
|
||||||
|
|
||||||
}
|
}
|
||||||
public partial class UICameraSwitch : UIPanel
|
public partial class UICameraSwitch : UIPanel
|
||||||
@ -58,14 +59,28 @@ namespace QFramework.Example
|
|||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
mData = uiData as UICameraSwitchData ?? new UICameraSwitchData();
|
mData = uiData as UICameraSwitchData ?? new UICameraSwitchData();
|
||||||
|
if (string.IsNullOrEmpty(mData.isOn))
|
||||||
if (Near.isOn)
|
|
||||||
{
|
{
|
||||||
SetNear();
|
if (Near.isOn)
|
||||||
|
{
|
||||||
|
SetNear();
|
||||||
|
}
|
||||||
|
if (Far.isOn)
|
||||||
|
{
|
||||||
|
SetNormal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Far.isOn)
|
else
|
||||||
{
|
{
|
||||||
SetNormal();
|
switch (mData.isOn)
|
||||||
|
{
|
||||||
|
case "near":
|
||||||
|
SetNear();
|
||||||
|
break;
|
||||||
|
case "normal":
|
||||||
|
SetNormal();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,6 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
mData = uiData as UIHintData ?? new UIHintData();
|
mData = uiData as UIHintData ?? new UIHintData();
|
||||||
SetItem(0);
|
SetItem(0);
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,6 +31,7 @@ namespace QFramework.Example
|
|||||||
}
|
}
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(gameObject);
|
||||||
mData = uiData as UIHintData ?? new UIHintData();
|
mData = uiData as UIHintData ?? new UIHintData();
|
||||||
if (curAction != null)
|
if (curAction != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -142,7 +142,6 @@ namespace QFramework.Example
|
|||||||
}
|
}
|
||||||
protected override void OnClose()
|
protected override void OnClose()
|
||||||
{
|
{
|
||||||
TypeEventSystem.Global.UnRegister<StepStatusOnChange>(OnStepChanged);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,6 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
mData = uiData as UIPointQuestionData ?? new UIPointQuestionData();
|
mData = uiData as UIPointQuestionData ?? new UIPointQuestionData();
|
||||||
// please add init code here
|
// please add init code here
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,6 +27,7 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(gameObject);
|
||||||
mData = uiData as UIPointQuestionData ?? new UIPointQuestionData();
|
mData = uiData as UIPointQuestionData ?? new UIPointQuestionData();
|
||||||
|
|
||||||
Content.RemoveAllChildren();
|
Content.RemoveAllChildren();
|
||||||
|
|||||||
@ -20,7 +20,6 @@ namespace QFramework.Example
|
|||||||
mData = uiData as UIResultTipData ?? new UIResultTipData();
|
mData = uiData as UIResultTipData ?? new UIResultTipData();
|
||||||
Right.gameObject.SetActive(false);
|
Right.gameObject.SetActive(false);
|
||||||
Wrong.gameObject.SetActive(false);
|
Wrong.gameObject.SetActive(false);
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,6 +29,7 @@ namespace QFramework.Example
|
|||||||
}
|
}
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(gameObject);
|
||||||
Right.gameObject.SetActive(false);
|
Right.gameObject.SetActive(false);
|
||||||
Wrong.gameObject.SetActive(false);
|
Wrong.gameObject.SetActive(false);
|
||||||
mData = uiData as UIResultTipData ?? new UIResultTipData();
|
mData = uiData as UIResultTipData ?? new UIResultTipData();
|
||||||
|
|||||||
@ -34,7 +34,6 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
mData = uiData as UITextQuestionData ?? new UITextQuestionData();
|
mData = uiData as UITextQuestionData ?? new UITextQuestionData();
|
||||||
// please add init code here
|
// please add init code here
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,6 +43,7 @@ namespace QFramework.Example
|
|||||||
}
|
}
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(gameObject);
|
||||||
mData = uiData as UITextQuestionData ?? new UITextQuestionData();
|
mData = uiData as UITextQuestionData ?? new UITextQuestionData();
|
||||||
Title.text = mData.title;
|
Title.text = mData.title;
|
||||||
OptionContent.transform.RemoveAllChildren();
|
OptionContent.transform.RemoveAllChildren();
|
||||||
|
|||||||
@ -22,8 +22,6 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
|
|
||||||
mData = uiData as UITextTipData ?? new UITextTipData();
|
mData = uiData as UITextTipData ?? new UITextTipData();
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenGameObjectDestroyed(this);
|
|
||||||
|
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,6 +32,7 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(gameObject);
|
||||||
mData = uiData as UITextTipData ?? new UITextTipData();
|
mData = uiData as UITextTipData ?? new UITextTipData();
|
||||||
Des.text = Regex.Replace(mData.text, @"\\n", "\n");
|
Des.text = Regex.Replace(mData.text, @"\\n", "\n");
|
||||||
BtnContent.RemoveAllChildren();
|
BtnContent.RemoveAllChildren();
|
||||||
|
|||||||
@ -27,7 +27,6 @@ namespace QFramework.Example
|
|||||||
mData = uiData as UITipWindowData ?? new UITipWindowData();
|
mData = uiData as UITipWindowData ?? new UITipWindowData();
|
||||||
// please add init code here
|
// please add init code here
|
||||||
|
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,6 +38,7 @@ namespace QFramework.Example
|
|||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
mData = uiData as UITipWindowData ?? new UITipWindowData();
|
mData = uiData as UITipWindowData ?? new UITipWindowData();
|
||||||
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(gameObject);
|
||||||
Label.text = mData.txt;
|
Label.text = mData.txt;
|
||||||
BtnContent.RemoveAllChildren();
|
BtnContent.RemoveAllChildren();
|
||||||
if (mData != null)
|
if (mData != null)
|
||||||
|
|||||||
@ -30,7 +30,6 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
mData = uiData as UIToolsData ?? new UIToolsData();
|
mData = uiData as UIToolsData ?? new UIToolsData();
|
||||||
// please add init code here
|
// please add init code here
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuit).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuit).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +40,7 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(gameObject);
|
||||||
mResLoader = ResLoader.Allocate();
|
mResLoader = ResLoader.Allocate();
|
||||||
mData = uiData as UIToolsData ?? new UIToolsData();
|
mData = uiData as UIToolsData ?? new UIToolsData();
|
||||||
if (string.IsNullOrEmpty(mData.answer) == false)
|
if (string.IsNullOrEmpty(mData.answer) == false)
|
||||||
|
|||||||
@ -666,6 +666,11 @@ namespace XMLTool
|
|||||||
{
|
{
|
||||||
act.args.Add("normalTime", "0");
|
act.args.Add("normalTime", "0");
|
||||||
}
|
}
|
||||||
|
XAttribute isOn = action.Attribute("isOn");
|
||||||
|
if (isOn != null)
|
||||||
|
{
|
||||||
|
act.args.Add("isOn", isOn.Value);
|
||||||
|
}
|
||||||
newAction = act;
|
newAction = act;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -51,8 +51,9 @@
|
|||||||
<Action type="SetScore" name="步骤名字" value="1"></Action>
|
<Action type="SetScore" name="步骤名字" value="1"></Action>
|
||||||
<!--镜头切换 近距离和默认 如果有了nearDevice就可以不用nearPos和nearRot了 按照device的坐标和旋转来处理镜头 normalDevice同理
|
<!--镜头切换 近距离和默认 如果有了nearDevice就可以不用nearPos和nearRot了 按照device的坐标和旋转来处理镜头 normalDevice同理
|
||||||
只设置坐标 不执行镜头切换 是否执行要根据UI的按钮操作来
|
只设置坐标 不执行镜头切换 是否执行要根据UI的按钮操作来
|
||||||
|
isOn: near或者normal 作为强制选择一个镜头
|
||||||
-->
|
-->
|
||||||
<Action type="CameraSwitch" nearDevice="肠钳" normalDevice="组织钳" nearPos="-3.942,3.24,-4.319" nearRot="16.42331,180,0" nearTime="1" normalPos="-3.942,3.24,-3.946" normalRot="16.42331,180,-5.305351E-14" normalTime="1"></Action>
|
<Action type="CameraSwitch" nearDevice="肠钳" normalDevice="组织钳" nearPos="-3.942,3.24,-4.319" nearRot="16.42331,180,0" nearTime="1" normalPos="-3.942,3.24,-3.946" normalRot="16.42331,180,-5.305351E-14" normalTime="1" isOn="near"></Action>
|
||||||
<!--文字弹窗 按钮可以多个 点击事件使用UIClick-->
|
<!--文字弹窗 按钮可以多个 点击事件使用UIClick-->
|
||||||
<Action type="TextTip" value="这里是文字描述" audio="q001.mp3" btns="确定,取消"/>
|
<Action type="TextTip" value="这里是文字描述" audio="q001.mp3" btns="确定,取消"/>
|
||||||
<!--锁定镜头 value为是否锁定-->
|
<!--锁定镜头 value为是否锁定-->
|
||||||
@ -127,7 +128,7 @@
|
|||||||
|
|
||||||
<!--通用事件通知
|
<!--通用事件通知
|
||||||
|
|
||||||
HighLightTrigger:value=false 关闭device悬浮高亮 value=true 开启
|
HighLightTrigger:value=false 关闭device悬浮高亮 value=true 开启 false value=false,deviceName 后面的参数是可以写设备名字 不写就是全部设备
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<Action type="StrEvent" name="HighLightTrigger" value="false"></Action>
|
<Action type="StrEvent" name="HighLightTrigger" value="false"></Action>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user