12 lines
267 B
GDScript
12 lines
267 B
GDScript
extends RigidBody3D
|
|
class_name Package
|
|
|
|
@onready var counted: bool = false
|
|
@onready var items: Array[Node3D] = []
|
|
|
|
func _on_item_entered(body: Node3D) -> void:
|
|
if not body in items:
|
|
items.append(body)
|
|
func _on_item_exited(body: Node3D) -> void:
|
|
items.erase(body)
|