item on ground and pickup
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user