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/ItemOnGroundSpawnWith.cs

17 lines
418 B

#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<ItemOnGround2D>();
parent.itemInstance = new ItemInstance { blueprint = _blueprint };
}
}