This commit is contained in:
parent
798549b5f9
commit
925e787d89
|
|
@ -19,6 +19,10 @@ namespace DefaultNamespace.ProcessMode
|
||||||
private List<IncorrectClick> incorrectClicks; // 错误点击的记录列表
|
private List<IncorrectClick> incorrectClicks; // 错误点击的记录列表
|
||||||
public AnimationProcess CurrentProcess => processes[currentMode.ToString()];
|
public AnimationProcess CurrentProcess => processes[currentMode.ToString()];
|
||||||
|
|
||||||
|
public delegate void CompleteEventHandler();
|
||||||
|
|
||||||
|
// 定义一个事件,使用委托类型
|
||||||
|
public event CompleteEventHandler OnCompleteEvent;
|
||||||
|
|
||||||
public void AddProcess(string type)
|
public void AddProcess(string type)
|
||||||
{
|
{
|
||||||
|
|
@ -124,6 +128,7 @@ namespace DefaultNamespace.ProcessMode
|
||||||
currentAction.CurrentObjectIndex = 0; // 重置当前动作对象索引
|
currentAction.CurrentObjectIndex = 0; // 重置当前动作对象索引
|
||||||
currentAction.ClickedObjects.Clear(); // 重置已点击对象集合
|
currentAction.ClickedObjects.Clear(); // 重置已点击对象集合
|
||||||
currentAction.FeedbackDisplayed = false; // 重置反馈显示标志
|
currentAction.FeedbackDisplayed = false; // 重置反馈显示标志
|
||||||
|
|
||||||
if (currentActionIndex >= step.Actions.Count)
|
if (currentActionIndex >= step.Actions.Count)
|
||||||
{
|
{
|
||||||
Debug.Log("所有动作完成!");
|
Debug.Log("所有动作完成!");
|
||||||
|
|
@ -134,6 +139,11 @@ namespace DefaultNamespace.ProcessMode
|
||||||
var nextStep = processes[currentMode.ToString()].Steps[currentStepIndex];
|
var nextStep = processes[currentMode.ToString()].Steps[currentStepIndex];
|
||||||
PrepareNextStep(currentMode, nextStep.Actions[0]); // 准备下一个步骤
|
PrepareNextStep(currentMode, nextStep.Actions[0]); // 准备下一个步骤
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OnCompleteEvent();
|
||||||
|
Debug.Log("全部完成了!!!!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue