immersive-home/content/functions/clickable.gd

39 lines
932 B
GDScript3
Raw Normal View History

2023-11-11 19:17:25 +02:00
extends Function
class_name Clickable
2023-11-22 02:44:07 +02:00
signal on_click(event: EventRay)
signal on_press_down(event: EventRay)
signal on_press_move(event: EventRay)
signal on_press_up(event: EventRay)
signal on_grab_down(event: EventRay)
signal on_grab_move(event: EventRay)
signal on_grab_up(event: EventRay)
signal on_ray_enter(event: EventRay)
signal on_ray_leave(event: EventRay)
func _on_click(event: EventRay):
2023-11-11 19:17:25 +02:00
on_click.emit(event)
2023-11-22 02:44:07 +02:00
func _on_press_down(event: EventRay):
2023-11-11 19:17:25 +02:00
on_press_down.emit(event)
2023-11-22 02:44:07 +02:00
func _on_press_move(event: EventRay):
2023-11-11 19:17:25 +02:00
on_press_move.emit(event)
2023-11-22 02:44:07 +02:00
func _on_press_up(event: EventRay):
2023-11-11 19:17:25 +02:00
on_press_up.emit(event)
2023-11-22 02:44:07 +02:00
func _on_grab_down(event: EventRay):
2023-11-11 19:17:25 +02:00
on_grab_down.emit(event)
2023-11-22 02:44:07 +02:00
func _on_grab_move(event: EventRay):
2023-11-11 19:17:25 +02:00
on_grab_move.emit(event)
2023-11-22 02:44:07 +02:00
func _on_grab_up(event: EventRay):
2023-11-11 19:17:25 +02:00
on_grab_up.emit(event)
2023-11-22 02:44:07 +02:00
func _on_ray_enter(event: EventRay):
2023-11-11 19:17:25 +02:00
on_ray_enter.emit(event)
2023-11-22 02:44:07 +02:00
func _on_ray_leave(event: EventRay):
2023-11-11 19:17:25 +02:00
on_ray_leave.emit(event)