Big fix of inventory system, add accessory item type

This commit is contained in:
2024-09-07 02:22:14 -07:00
parent 33d282ebfb
commit 98d096303c
22 changed files with 229 additions and 100 deletions

View File

@@ -2,14 +2,11 @@
using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection;
using Godot;
using System.Linq;
namespace GameJamDungeon
{
public interface IInventoryItem : INode3D
{
public abstract InventoryItemInfo InventoryInfo { get; set; }
public IGameRepo GameRepo { get; }
}
@@ -17,10 +14,9 @@ namespace GameJamDungeon
public abstract partial class InventoryItem : Node3D, IInventoryItem
{
public override void _Notification(int what) => this.Notify(what);
[Dependency] public IGameRepo GameRepo => this.DependOn<IGameRepo>();
public abstract InventoryItemInfo InventoryInfo { get; set; }
internal abstract InventoryItemInfo Info { get; set; }
[Node] public Area3D Pickup { get; set; } = default!;
}