added signalling to button and demo

This commit is contained in:
Hartmut Seichter 2025-07-08 21:25:46 +02:00
parent af27e657f6
commit 7987fa3c8a
2 changed files with 31 additions and 2 deletions

View file

@ -7,6 +7,8 @@ extends Node
var state : int = 0
signal on_vrpn_button(data:Dictionary)
func _ready():
if not vrpn_client:
push_warning("No VRPN client for button on '%s' given." % [self.name])
@ -15,4 +17,4 @@ func _ready():
func _on_vrpn(vrpn_data : Dictionary) -> void:
if vrpn_data['sensor'] == button_sensor:
pass
on_vrpn_button.emit(vrpn_data)