12 lines
267 B
GDScript3
12 lines
267 B
GDScript3
|
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)
|