refactor work and documentation
This commit is contained in:
parent
46491f8e2f
commit
5b203c9531
4 changed files with 23 additions and 9 deletions
|
@ -3,14 +3,14 @@ extends Node
|
|||
|
||||
@export var vrpn_client : VRPN_Client = null
|
||||
@export var button_sensor : String = "Button0"
|
||||
@export var register_on_start : bool = true
|
||||
@export var register_on_ready : bool = true
|
||||
|
||||
var state : int = 0
|
||||
|
||||
func _ready():
|
||||
if not vrpn_client:
|
||||
push_warning("No VRPN client for button on '%s' given." % [self.name])
|
||||
elif register_on_start:
|
||||
elif register_on_ready:
|
||||
vrpn_client.buttons.append(self)
|
||||
|
||||
func _on_vrpn(vrpn_data : Dictionary) -> void:
|
||||
|
|
|
@ -6,10 +6,10 @@ extends Node3D
|
|||
@export var tracker_sensor : int = 0
|
||||
@export var tracker_use_position : bool = true
|
||||
@export var tracker_use_rotation : bool = true
|
||||
@export var register_on_start : bool = true
|
||||
@export var register_on_ready : bool = true
|
||||
|
||||
func _ready() -> void:
|
||||
if vrpn_client and register_on_start:
|
||||
if vrpn_client and register_on_ready:
|
||||
vrpn_client.tracker.append(self)
|
||||
|
||||
func _on_vrpn(vrpn_data : Dictionary):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue