Ze pew
This commit is contained in:
12
PickableItems/basic_item.gd
Normal file
12
PickableItems/basic_item.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends Area2D
|
||||
|
||||
@export var Type : String;
|
||||
@export var Item : PackedScene;
|
||||
|
||||
func _on_body_entered(body):
|
||||
if body.name == "Player":
|
||||
pickup_routine(body);
|
||||
|
||||
func pickup_routine(player):
|
||||
player.pickup(self);
|
||||
queue_free();
|
||||
Reference in New Issue
Block a user