generated from SGDA/GodotExampleProject
feat: small world and interactibles
This commit is contained in:
17
scenes/interactibles/interactible.gd
Normal file
17
scenes/interactibles/interactible.gd
Normal file
@ -0,0 +1,17 @@
|
||||
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
|
Reference in New Issue
Block a user