Major Player refactor

This commit is contained in:
2025-02-07 02:29:50 -08:00
parent 0cdae88952
commit fe1a1e61ef
132 changed files with 2554 additions and 2478 deletions

View File

@@ -4,6 +4,8 @@ using Chickensoft.Introspection;
using GameJamDungeon;
using Godot;
namespace GameJamDungeon;
public interface IMenu : IControl
{
event Menu.NewGameEventHandler NewGame;

View File

@@ -3,28 +3,27 @@ using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection;
using Godot;
namespace GameJamDungeon
namespace GameJamDungeon;
public interface ISplash : IControl;
[Meta(typeof(IAutoNode))]
public partial class Splash : Control, ISplash
{
public interface ISplash : IControl;
public override void _Notification(int what) => this.Notify(what);
[Meta(typeof(IAutoNode))]
public partial class Splash : Control, ISplash
{
public override void _Notification(int what) => this.Notify(what);
[Dependency]
public IAppRepo AppRepo => this.DependOn<IAppRepo>();
[Dependency]
public IAppRepo AppRepo => this.DependOn<IAppRepo>();
[Node]
public IAnimationPlayer AnimationPlayer { get; set; } = default!;
[Node]
public IAnimationPlayer AnimationPlayer { get; set; } = default!;
public void OnReady() =>
AnimationPlayer.AnimationFinished += OnAnimationFinished;
public void OnReady() =>
AnimationPlayer.AnimationFinished += OnAnimationFinished;
public void OnExitTree()
=> AnimationPlayer.AnimationFinished -= OnAnimationFinished;
public void OnExitTree()
=> AnimationPlayer.AnimationFinished -= OnAnimationFinished;
public void OnAnimationFinished(StringName name)
=> AppRepo.SkipSplashScreen();
}
public void OnAnimationFinished(StringName name)
=> AppRepo.SkipSplashScreen();
}