增加跳步loading
This commit is contained in:
parent
019ec34980
commit
d69bb45c4d
@ -155,6 +155,7 @@ public class OperationController : MonoSingleton<OperationController>
|
||||
}
|
||||
}
|
||||
}
|
||||
TypeEventSystem.Global.Send<OnLoadingShow>();
|
||||
seq.Start(this, () =>
|
||||
{
|
||||
curAction = ActionHelper.GetActionAndSub(steps[targetIndex].Start);
|
||||
@ -174,6 +175,7 @@ public class OperationController : MonoSingleton<OperationController>
|
||||
}
|
||||
TypeEventSystem.Global.Send(new StepStatusOnChange() { curIndex = i, status = StepStatus.NoStart });
|
||||
}
|
||||
TypeEventSystem.Global.Send<OnLoadingShow>();
|
||||
seq.Start(this, () =>
|
||||
{
|
||||
curAction = ActionHelper.GetActionAndSub(steps[targetIndex].Start);
|
||||
@ -196,10 +198,12 @@ public class OperationController : MonoSingleton<OperationController>
|
||||
this.index = targetIndex;
|
||||
isStepRun = true;
|
||||
TypeEventSystem.Global.Send(new StepStatusOnChange() { curIndex = targetIndex, status = StepStatus.Start });
|
||||
TypeEventSystem.Global.Send<OnLoadingHide>();
|
||||
curAction.Start(this, () =>
|
||||
{
|
||||
isStepRun = false;
|
||||
TypeEventSystem.Global.Send(new StepStatusOnChange() { curIndex = targetIndex, status = StepStatus.Finished });
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
@ -15,7 +15,13 @@ namespace QFramework.Example
|
||||
{
|
||||
mData = uiData as UILoadingData ?? new UILoadingData();
|
||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||
TypeEventSystem.Global.Register<OnLoadingShow>(arg => Show()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||
TypeEventSystem.Global.Register<OnLoadingShow>(arg =>
|
||||
{
|
||||
if (gameObject.activeSelf == false)
|
||||
{
|
||||
Show();
|
||||
}
|
||||
}).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||
TypeEventSystem.Global.Register<OnLoadingHide>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user