You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Babushka/scripts/CSharp/Common/Inventory/ItemOnGroundSpawnWith2D.cs

16 lines
400 B

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 };
}
}