feat: can name interactible objects
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 7s
Create tag and build when new code gets to main / Export (push) Successful in 2m15s

This commit is contained in:
2025-06-28 12:46:58 +02:00
parent 1b83af938f
commit e6da2f34e6
3 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,7 @@ class_name Interactible
# @export_file("*.tscn") var scene_to_trigger: String
@export var message: String
@export var interact_text: String
@export var event: String
signal event_triggered(event_id: String)
@ -10,12 +11,16 @@ signal event_triggered(event_id: String)
@onready var rich_text_label: RichTextLabel = $RichTextLabel
@onready var confirm_panel: Panel = %ConfirmPanel
@onready var message_box: Label = %MessageBox
@onready var interact_box: RichTextLabel = $RichTextLabel
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
rich_text_label.visible = false
confirm_panel.visible = false
message_box.text = message.to_upper()
if not interact_text.is_empty():
interact_box.text = interact_text.to_upper()
func _on_body_entered(body: Node2D) -> void:
rich_text_label.visible = true