13 lines
302 B
GDScript
13 lines
302 B
GDScript
class_name Clickable
|
|
extends Node
|
|
|
|
@export var actions: Array[ClickAction] = []
|
|
@export var cursor_hint: String = "interact"
|
|
|
|
signal clicked(hit_position: Vector3)
|
|
|
|
func on_clicked(hit_position: Vector3) -> void:
|
|
clicked.emit(hit_position)
|
|
for action in actions:
|
|
action.execute(self, hit_position)
|