rename to VRPN_Client to make sure there is no confusion
This commit is contained in:
parent
3f823111d1
commit
46491f8e2f
6 changed files with 41 additions and 42 deletions
|
@ -1,17 +1,17 @@
|
|||
class_name VRPN_Button
|
||||
extends Node
|
||||
|
||||
@export var vrpn : VRPN = null
|
||||
@export var vrpn_client : VRPN_Client = null
|
||||
@export var button_sensor : String = "Button0"
|
||||
@export var register_on_start : bool = true
|
||||
|
||||
var state : int = 0
|
||||
|
||||
func _ready():
|
||||
if not vrpn:
|
||||
if not vrpn_client:
|
||||
push_warning("No VRPN client for button on '%s' given." % [self.name])
|
||||
elif register_on_start:
|
||||
vrpn.buttons.append(self)
|
||||
vrpn_client.buttons.append(self)
|
||||
|
||||
func _on_vrpn(vrpn_data : Dictionary) -> void:
|
||||
if vrpn_data['sensor'] == button_sensor:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue