Files
Embodiment/Levels/Chest Detection.gd

16 lines
339 B
GDScript

extends Area2D
onready var portal = get_node('../PortalDarkForest')
onready var shape = portal.get_child(0)
func _ready() -> void:
shape.set_deferred('disabled', true)
return
func _on_chest_detection_body_entered(body: Node) -> void:
if body.is_in_group('player'):
shape.set_deferred('disabled', false)
return