update samples

This commit is contained in:
hevinci
2022-11-26 17:39:52 +08:00
parent f31e5e0d22
commit f6f326119c
17 changed files with 169 additions and 108 deletions
@@ -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();
@@ -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);