2023-01-15 11:17:51 -05:00
|
|
|
extends Area2D
|
|
|
|
|
|
|
|
@export var Type : String;
|
|
|
|
@export var Item : PackedScene;
|
|
|
|
|
2023-01-15 15:02:42 -05:00
|
|
|
|
2023-01-15 11:17:51 -05:00
|
|
|
func _on_body_entered(body):
|
|
|
|
if body.name == "Player":
|
|
|
|
pickup_routine(body);
|
|
|
|
|
|
|
|
func pickup_routine(player):
|
|
|
|
player.pickup(self);
|
2023-01-15 14:15:51 -05:00
|
|
|
emit_signal("picked");
|
2023-01-15 11:17:51 -05:00
|
|
|
queue_free();
|
2023-01-15 14:15:51 -05:00
|
|
|
|
|
|
|
signal picked();
|