Files
GameJamDungeon/src/ui/death_menu/DeathMenu.cs
2025-02-07 02:29:50 -08:00

25 lines
572 B
C#

using Chickensoft.AutoInject;
using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection;
using Godot;
namespace GameJamDungeon;
public interface IDeathMenu : IControl
{
void FadeIn();
void FadeOut();
}
[Meta(typeof(IAutoNode))]
public partial class DeathMenu : Control, IDeathMenu
{
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");
}