2020-07-20 00:28:15 -05:00
|
|
|
extends Area2D
|
2020-07-21 20:06:39 -05:00
|
|
|
class_name Collectable
|
|
|
|
|
|
|
|
export var ID: int = 0
|
2020-07-20 00:28:15 -05:00
|
|
|
|
|
|
|
func _on_Area2D_body_entered(body):
|
|
|
|
if body.get("Inventory") != null:
|
2020-07-21 20:06:39 -05:00
|
|
|
body.Inventory.add_item(ID)
|
2020-07-21 23:39:14 -05:00
|
|
|
Player.unlocked.append(ID)
|
2020-07-20 00:28:15 -05:00
|
|
|
queue_free()
|