Init
This commit is contained in:
12
scripts/clickable.gd
Normal file
12
scripts/clickable.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user