item on ground and pickup

This commit is contained in:
cblech
2025-04-14 16:49:29 +02:00
parent 9190b2a16a
commit 1062193785
10 changed files with 147 additions and 3 deletions
@@ -0,0 +1,16 @@
#nullable enable
using Godot;
namespace Babushka.scripts.CSharp.Common.Inventory;
public partial class ItemOnGroundSpawnWith : Node
{
[Export] private ItemResource? _blueprint = null;
public override void _EnterTree()
{
if(_blueprint == null) return;
var parent = GetParent<ItemOnGround>();
parent.itemInstance = new ItemInstance { blueprint = _blueprint };
}
}