Big refactor in place: Organize nodes in line with dependency injection expectations, use state machine flow more

This commit is contained in:
2024-09-11 15:33:36 -07:00
parent 6a4eb81529
commit 4d47a7586e
63 changed files with 1123 additions and 469 deletions

View File

@@ -0,0 +1,23 @@
using Chickensoft.AutoInject;
using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection;
using Godot;
using System;
public interface IPauseMenu : IControl
{
void FadeIn();
void FadeOut();
}
[Meta(typeof(IAutoNode))]
public partial class PauseMenu : Control, IPauseMenu
{
public override void _Notification(int what) => this.Notify(what);
[Node] public IAnimationPlayer AnimationPlayer { get; set; } = default!;
public void FadeIn() => AnimationPlayer.Play("fade_in");
public void FadeOut() => AnimationPlayer.Play("fade_out");
}