Files
GameJamDungeon/src/items/InventoryItem.cs
2024-09-08 14:19:30 -07:00

30 lines
743 B
C#

using Chickensoft.AutoInject;
using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection;
using Godot;
using System.Linq;
namespace GameJamDungeon
{
public interface IInventoryItem : INode3D
{
public IGameRepo GameRepo { get; }
public InventoryItemInfo Info { get; }
}
[Meta(typeof(IAutoNode))]
public 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 Sprite3D Sprite { get; set; } = default!;
public InventoryItemInfo Info { get; set; } = new InventoryItemInfo();
}
}