diff options
Diffstat (limited to 'godot/scripts/machines')
| -rw-r--r-- | godot/scripts/machines/NetworkedMachineGDS.gd | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/godot/scripts/machines/NetworkedMachineGDS.gd b/godot/scripts/machines/NetworkedMachineGDS.gd index 3f2d420..c1d755d 100644 --- a/godot/scripts/machines/NetworkedMachineGDS.gd +++ b/godot/scripts/machines/NetworkedMachineGDS.gd @@ -1,26 +1,26 @@ extends RigidBody -var in_use : bool = false -var user = null -var world = null +var in_use: bool = false +var user: RigidBody = null +var world: Spatial = null func _ready(): print("net machine loads world") world = get_tree().get_root().find_node("GAMEWORLD", true, false) -remote func update_phys_transform(t, lv, av): +remote func update_phys_transform(t: Transform, lv: Vector3, av: Vector3): transform = t linear_velocity = lv angular_velocity = av -remotesync func net_apply_impulse(impulse_v): +remotesync func net_apply_impulse(impulse_v: Vector3): apply_central_impulse(impulse_v) -func _integrate_forces(_state): +func _integrate_forces(_state: PhysicsDirectBodyState): if is_network_master() and mode == MODE_RIGID: rpc("update_phys_transform", transform, linear_velocity, angular_velocity) -remotesync func set_net_owner(id, char_name): +remotesync func set_net_owner(id: int, char_name: String): set_network_master(id) if id == 1 and char_name == "NONE": #not under control on_no_control() @@ -51,11 +51,11 @@ func attack1(): func attack2(): pass -func direction_input(_fwd,_bwd,_left,_right,_left2,_right2): +func direction_input(_fwd: float,_bwd: float,_left: float,_right: float,_left2: float,_right2: float): pass -func misc_input(_ctrl,_space,_shift): +func misc_input(_ctrl: float,_space: float,_shift: float): pass -func mouse_input(_m1,_m3,_m2): #used for long-press actions +func mouse_input(_m1: float,_m3: float,_m2: float): #used for long-press actions pass |
