26 lines
580 B
C#
26 lines
580 B
C#
using Chickensoft.AutoInject;
|
|
using Chickensoft.Introspection;
|
|
using Godot;
|
|
|
|
namespace Zennysoft.Game.Ma;
|
|
|
|
[Meta(typeof(IAutoNode))]
|
|
public partial class ExitRoom : DungeonRoom
|
|
{
|
|
public override void _Notification(int what) => this.Notify(what);
|
|
|
|
[Dependency] public IGame Game => this.DependOn<IGame>();
|
|
|
|
[Node] private Area3D _exit { get; set; } = default!;
|
|
|
|
public override void _Ready()
|
|
{
|
|
_exit.AreaEntered += Exit_AreaEntered;
|
|
}
|
|
|
|
public void ExitReached()
|
|
=> Game.FloorExitReached();
|
|
|
|
private void Exit_AreaEntered(Area3D area) => ExitReached();
|
|
}
|