Initial commit

This commit is contained in:
2024-02-08 22:16:58 +01:00
commit 89e97a200c
524 changed files with 15626 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
extends Marker2D
"""
Add this to any node. spawn instances an Item.tscn node with the defined values
"""
var item_scene = preload("res://scenes/items/Item.tscn")
@export var item_type: String = "Generic Item"
@export var amount: int = 1
func spawn():
var item = item_scene.instantiate()
owner.get_parent().add_child(item)
item.global_position = global_position
item.item_type = item_type
item.amount = amount
pass