Teleport works, item pickup is broken
This commit is contained in:
@@ -28,8 +28,6 @@ namespace GameJamDungeon
|
||||
|
||||
[Node] public ISubViewport GameWindow { get; set; } = default!;
|
||||
|
||||
[Node] public IAnimationPlayer AnimationPlayer { get; set; } = default!;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
Instantiator = new Instantiator(GetTree());
|
||||
@@ -38,8 +36,6 @@ namespace GameJamDungeon
|
||||
AppLogic.Set(AppRepo);
|
||||
Menu.NewGame += OnNewGame;
|
||||
Menu.Quit += OnQuit;
|
||||
AppRepo.ShowLoadingScreen += OnShowLoadingScreen;
|
||||
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
|
||||
this.Provide();
|
||||
}
|
||||
|
||||
@@ -51,7 +47,6 @@ namespace GameJamDungeon
|
||||
.Handle((in AppLogic.Output.ShowLoadingScreen _) =>
|
||||
{
|
||||
Menu.Hide();
|
||||
AnimationPlayer.Play("load");
|
||||
})
|
||||
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
||||
{
|
||||
@@ -70,19 +65,6 @@ namespace GameJamDungeon
|
||||
AppLogic.Start();
|
||||
}
|
||||
|
||||
private void OnShowLoadingScreen()
|
||||
{
|
||||
AnimationPlayer.Play("wait_and_load");
|
||||
}
|
||||
|
||||
private void AnimationPlayer_AnimationFinished(StringName animName)
|
||||
{
|
||||
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());
|
||||
|
||||
public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame());
|
||||
|
||||
Reference in New Issue
Block a user