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

15
scenes/items/Item.gd Normal file
View File

@@ -0,0 +1,15 @@
extends Area2D
@export var item_type: String = "Generic Item"
@export var amount: int = 1
func _ready():
body_entered.connect(_on_Item_body_entered)
pass
func _on_Item_body_entered(body):
if body is Player:
body_entered.disconnect(_on_Item_body_entered)
Inventory.add_item(item_type, amount)
$anims.play("collected")
pass