update samples
This commit is contained in:
+1
-2
@@ -17,8 +17,6 @@ internal class FsmSceneBattle : IStateNode
|
||||
}
|
||||
void IStateNode.OnEnter()
|
||||
{
|
||||
UniWindow.OpenWindowSync<UILoadingWindow>("UILoading");
|
||||
|
||||
UniModule.StartCoroutine(Prepare());
|
||||
}
|
||||
void IStateNode.OnUpdate()
|
||||
@@ -37,6 +35,7 @@ internal class FsmSceneBattle : IStateNode
|
||||
|
||||
private IEnumerator Prepare()
|
||||
{
|
||||
yield return UniWindow.OpenWindowAsync<UILoadingWindow>("UILoading");
|
||||
yield return YooAssets.LoadSceneAsync("scene_battle");
|
||||
|
||||
_battleRoom = new BattleRoom();
|
||||
|
||||
+3
-3
@@ -16,9 +16,6 @@ internal class FsmSceneHome : IStateNode
|
||||
}
|
||||
void IStateNode.OnEnter()
|
||||
{
|
||||
if (_machine.PreviousNode != typeof(FsmInitGame).FullName)
|
||||
UniWindow.OpenWindowSync<UILoadingWindow>("UILoading");
|
||||
|
||||
UniModule.StartCoroutine(Prepare());
|
||||
}
|
||||
void IStateNode.OnUpdate()
|
||||
@@ -31,6 +28,9 @@ internal class FsmSceneHome : IStateNode
|
||||
|
||||
private IEnumerator Prepare()
|
||||
{
|
||||
if (_machine.PreviousNode != typeof(FsmInitGame).FullName)
|
||||
yield return UniWindow.OpenWindowAsync<UILoadingWindow>("UILoading");
|
||||
|
||||
yield return YooAssets.LoadSceneAsync("scene_home");
|
||||
yield return UniWindow.OpenWindowAsync<UIHomeWindow>("UIHome");
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
Reference in New Issue
Block a user