diff --git a/Assets/Scripts/UI/UITextQuestion.cs b/Assets/Scripts/UI/UITextQuestion.cs
index d1b44fab..b1e6d874 100644
--- a/Assets/Scripts/UI/UITextQuestion.cs
+++ b/Assets/Scripts/UI/UITextQuestion.cs
@@ -22,6 +22,7 @@ namespace QFramework.Example
public float errorScore = 0;
public string scoreName = string.Empty;
public string format;
+ public string finishedEvent;
///
/// 绝对的 不计算分项得分 对就得分 错就不得分
///
@@ -88,7 +89,7 @@ namespace QFramework.Example
}
});
}
- else if(mData.errorScore != 0)
+ else if (mData.errorScore != 0)
{
Check(false, count =>
{
@@ -105,17 +106,26 @@ namespace QFramework.Example
if (mData.waitCloseTime != -1)
{
- ActionKit.Delay(mData.waitCloseTime, () => Hide()).Start(this);
+ ActionKit.Delay(mData.waitCloseTime, () => HideSelf()).Start(this);
return;
}
- Hide();
-
+ HideSelf();
});
}
}
+
+ public void HideSelf()
+ {
+ if (string.IsNullOrEmpty(mData.finishedEvent) == false)
+ {
+ StringEventSystem.Global.Send(mData.finishedEvent);
+ }
+ Hide();
+ }
+
public void Check(bool isRight, Action callback)
{
int count = 0;
diff --git a/Assets/Scripts/Xml/XmlParser.cs b/Assets/Scripts/Xml/XmlParser.cs
index cd411904..47555553 100644
--- a/Assets/Scripts/Xml/XmlParser.cs
+++ b/Assets/Scripts/Xml/XmlParser.cs
@@ -522,6 +522,11 @@ namespace XMLTool
{
act.args.Add("format", format.Value);
}
+ XAttribute finishedEvent = action.Attribute("finishedEvent");
+ if (finishedEvent != null)
+ {
+ act.args.Add("finishedEvent", finishedEvent.Value);
+ }
newAction = act;
}
break;
diff --git a/Doc/Xml閰嶇疆鏂囨。.xml b/Doc/Xml閰嶇疆鏂囨。.xml
index 1accb015..37600c9e 100644
--- a/Doc/Xml閰嶇疆鏂囨。.xml
+++ b/Doc/Xml閰嶇疆鏂囨。.xml
@@ -40,8 +40,9 @@
absolutely="false" true閿欎竴涓夐」灏辨墸鍏ㄩ儴鍒 false鎸夐敊鐨勯夐」鏁伴噺鏉ョ畻鍒
format="{0:F1}" F1浠h〃淇濈暀1浣嶅皬鏁 F2浠h〃2浣 F0浠h〃涓嶄繚鐣欏皬鏁
娉ㄦ剰锛歳ightScore涓巜rongScore涓嶈兘鍚屾椂瀛樺湪 鍚屾椂瀛樺湪鍒欏彧鐢熸晥rightScore
+ finishedEvent 鐢ㄤ簬鐩戝惉閫夋嫨棰楿I娑堝け
-->
-
+