|
- extends Node
-
- export var target_path : NodePath = ".."
-
- signal on_interact_pressed
- signal on_interact_released
-
- func _ready():
- if target_path:
- var target_node = get_node(target_path)
- if target_node != null and target_node.has_method("on_interact_pressed"):
- self.connect("on_interact_pressed", target_node, "on_interact_pressed")
- if target_node != null and target_node.has_method("on_interact_released"):
- self.connect("on_interact_released", target_node, "on_interact_released")
-
- func on_interact_pressed(interactor):
- emit_signal("on_interact_pressed", interactor)
-
- func on_interact_released(interactor):
- emit_signal("on_interact_released", interactor)
|