Files
EGJ25/scenes/interactibles/interactible.gd

18 lines
434 B
GDScript3
Raw Normal View History

2025-06-28 10:23:35 +02:00
extends Area2D
class_name Interactible
@export_file("*.tscn") var scene_to_trigger : String
@onready var rich_text_label: RichTextLabel = $RichTextLabel
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
rich_text_label.visible = false
func _on_body_entered(body: Node2D) -> void:
rich_text_label.visible = true
func _on_body_exited(body: Node2D) -> void:
rich_text_label.visible = false