Major Player refactor
This commit is contained in:
@@ -4,6 +4,8 @@ using Chickensoft.Introspection;
|
||||
using GameJamDungeon;
|
||||
using Godot;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
public interface IMenu : IControl
|
||||
{
|
||||
event Menu.NewGameEventHandler NewGame;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user