added signalling to button and demo
This commit is contained in:
parent
af27e657f6
commit
7987fa3c8a
2 changed files with 31 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue