Armazon/scripts/package.gd

12 lines
267 B
GDScript3
Raw Permalink Normal View History

2024-01-28 13:44:54 -05:00
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)