Trying teleport again
This commit is contained in:
@@ -38,6 +38,7 @@ namespace GameJamDungeon
|
||||
AppLogic.Set(AppRepo);
|
||||
Menu.NewGame += OnNewGame;
|
||||
Menu.Quit += OnQuit;
|
||||
AppRepo.ShowLoadingScreen += OnShowLoadingScreen;
|
||||
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
|
||||
this.Provide();
|
||||
}
|
||||
@@ -69,9 +70,17 @@ namespace GameJamDungeon
|
||||
AppLogic.Start();
|
||||
}
|
||||
|
||||
private void OnShowLoadingScreen()
|
||||
{
|
||||
AnimationPlayer.Play("wait_and_load");
|
||||
}
|
||||
|
||||
private void AnimationPlayer_AnimationFinished(StringName animName)
|
||||
{
|
||||
AppLogic.Input(new AppLogic.Input.LoadGameFinished());
|
||||
if (animName == "wait_and_load")
|
||||
Instantiator.SceneTree.Paused = false;
|
||||
else if (animName == "load")
|
||||
AppLogic.Input(new AppLogic.Input.LoadGameFinished());
|
||||
}
|
||||
|
||||
public void OnNewGame() => AppLogic.Input(new AppLogic.Input.NewGame());
|
||||
|
||||
Reference in New Issue
Block a user