Files
net-gunner/scripts/collectable.gd

18 lines
245 B
GDScript

class_name Collectable extends Area3D
enum Type{
DATAKEY,
INTEGRITY,
SCAN,
BASIC_HACK,
ADVANCED_HACK
}
@export var type : Type
func _on_body_entered(body: Node3D) -> void:
if body is PawnController:
body.collect(type)
queue_free()