using Chickensoft.AutoInject; using Chickensoft.Introspection; using Godot; using Zennysoft.Game.Ma; using Zennysoft.Ma.Adapter; [Meta(typeof(IAutoNode))] public partial class River : SpecialFloor { public override void _Notification(int what) => this.Notify(what); [Node] private Area3D Exit { get; set; } = default!; [Node] private Marker3D PlayerSpawnPoint { get; set; } = default!; [Dependency] protected IGame Game => this.DependOn(); public void OnResolved() { Show(); Exit.AreaEntered += Exit_AreaEntered; FloorIsLoaded = true; } private void Exit_AreaEntered(Area3D area) { if (area.GetOwner() is IPlayer) ExitReached(); } public void ExitReached() => Game.FloorExitReached(); public void OnExitTree() { Exit.AreaEntered -= Exit_AreaEntered; } }