Merge branch 'master' into LouDi_Quan
This commit is contained in:
commit
77a99d4de8
@ -22,6 +22,7 @@ namespace QFramework.Example
|
|||||||
public float errorScore = 0;
|
public float errorScore = 0;
|
||||||
public string scoreName = string.Empty;
|
public string scoreName = string.Empty;
|
||||||
public string format;
|
public string format;
|
||||||
|
public string finishedEvent;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绝对的 不计算分项得分 对就得分 错就不得分
|
/// 绝对的 不计算分项得分 对就得分 错就不得分
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -105,17 +106,26 @@ namespace QFramework.Example
|
|||||||
if (mData.waitCloseTime != -1)
|
if (mData.waitCloseTime != -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
ActionKit.Delay(mData.waitCloseTime, () => Hide()).Start(this);
|
ActionKit.Delay(mData.waitCloseTime, () => HideSelf()).Start(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Hide();
|
HideSelf();
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void HideSelf()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(mData.finishedEvent) == false)
|
||||||
|
{
|
||||||
|
StringEventSystem.Global.Send(mData.finishedEvent);
|
||||||
|
}
|
||||||
|
Hide();
|
||||||
|
}
|
||||||
|
|
||||||
public void Check(bool isRight, Action<int> callback)
|
public void Check(bool isRight, Action<int> callback)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|||||||
@ -522,6 +522,11 @@ namespace XMLTool
|
|||||||
{
|
{
|
||||||
act.args.Add("format", format.Value);
|
act.args.Add("format", format.Value);
|
||||||
}
|
}
|
||||||
|
XAttribute finishedEvent = action.Attribute("finishedEvent");
|
||||||
|
if (finishedEvent != null)
|
||||||
|
{
|
||||||
|
act.args.Add("finishedEvent", finishedEvent.Value);
|
||||||
|
}
|
||||||
newAction = act;
|
newAction = act;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -40,8 +40,9 @@
|
|||||||
absolutely="false" true错一个选项就扣全部分 false按错的选项数量来算分
|
absolutely="false" true错一个选项就扣全部分 false按错的选项数量来算分
|
||||||
format="{0:F1}" F1代表保留1位小数 F2代表2位 F0代表不保留小数
|
format="{0:F1}" F1代表保留1位小数 F2代表2位 F0代表不保留小数
|
||||||
注意:rightScore与wrongScore不能同时存在 同时存在则只生效rightScore
|
注意:rightScore与wrongScore不能同时存在 同时存在则只生效rightScore
|
||||||
|
finishedEvent 用于监听选择题UI消失
|
||||||
-->
|
-->
|
||||||
<Action type="TextQuestion" title="这里是标题" options="A.111|B.222|C.333|D.4444" answers="2" btns="确定" wait="1" showAnswer="true" scoreName="分数名" rightScore="5" wrongScore="-5" absolutely="false" format="{0:F1}"></Action>
|
<Action type="TextQuestion" title="这里是标题" options="A.111|B.222|C.333|D.4444" answers="2" btns="确定" wait="1" showAnswer="true" scoreName="分数名" rightScore="5" wrongScore="-5" absolutely="false" format="{0:F1}" finishedEvent="事件名"></Action>
|
||||||
<!--提示 time为显示的时间 -1则一直显示 icon是前面的绿色图标是否显示 audio是音频 位于data文件夹下的Audio-->
|
<!--提示 time为显示的时间 -1则一直显示 icon是前面的绿色图标是否显示 audio是音频 位于data文件夹下的Audio-->
|
||||||
<Action type="Hint" value="这里是文字描述" time="5" icon="false" audio="音频.mp3"></Action>
|
<Action type="Hint" value="这里是文字描述" time="5" icon="false" audio="音频.mp3"></Action>
|
||||||
<!--设置变量 value只能是数字可以是小数-->
|
<!--设置变量 value只能是数字可以是小数-->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user