Changes to ItemOnGround

This commit is contained in:
2025-05-20 18:27:40 +02:00
parent ee897db52b
commit f3ed5e0ad0
4 changed files with 68 additions and 0 deletions
@@ -0,0 +1,16 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Inventory;
public partial class ItemOnGroundSpawnWith2D : Node
{
[Export] private ItemResource? _blueprint = null;
public override void _EnterTree()
{
if(_blueprint == null) return;
var parent = GetParent<ItemOnGround2D>();
parent.itemInstance = new ItemInstance { blueprint = _blueprint };
}
}