25 lines
572 B
C#
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");
|
|
}
|