This commit is contained in:
2024-09-08 02:00:18 -07:00
parent 5240fd5f92
commit 29a6d1072c
36 changed files with 1194 additions and 203 deletions

View File

@@ -8,16 +8,26 @@ namespace GameJamDungeon
public interface IInventoryItem : INode3D
{
public IGameRepo GameRepo { get; }
public void DropItem();
}
[Meta(typeof(IAutoNode))]
public abstract partial class InventoryItem : Node3D, IInventoryItem
{
public override void _Notification(int what) => this.Notify(what);
[Dependency] public IGameRepo GameRepo => this.DependOn<IGameRepo>();
[Node] public Area3D Pickup { get; set; } = default!;
[Node] public AnimationPlayer AnimationPlayer { get; set; } = default!;
internal abstract InventoryItemInfo Info { get; set; }
[Node] public Area3D Pickup { get; set; } = default!;
public void DropItem()
{
AnimationPlayer.Play("drop");
}
}
}