mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2025-10-21 19:30:35 +00:00
Deleted rotation sync
This commit is contained in:
parent
bde1f29107
commit
0c38e87bb1
@ -36,7 +36,7 @@ func _physics_process(delta):
|
|||||||
if get_tree().has_network_peer():
|
if get_tree().has_network_peer():
|
||||||
if is_network_master():
|
if is_network_master():
|
||||||
mode_switch(delta)
|
mode_switch(delta)
|
||||||
screen_wrap()
|
screen_wrap()
|
||||||
|
|
||||||
|
|
||||||
func mode_switch(delta):
|
func mode_switch(delta):
|
||||||
@ -122,7 +122,6 @@ func _on_network_tick_rate_timeout():
|
|||||||
if is_network_master():
|
if is_network_master():
|
||||||
rset_unreliable("puppet_position", global_position)
|
rset_unreliable("puppet_position", global_position)
|
||||||
rset_unreliable("puppet_velocity", velocity)
|
rset_unreliable("puppet_velocity", velocity)
|
||||||
rset_unreliable("puppet_rotation", rotation_degrees)
|
|
||||||
|
|
||||||
|
|
||||||
sync func update_position(pos):
|
sync func update_position(pos):
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
signal new_server
|
signal new_server
|
||||||
signal remove_server
|
signal remove_server
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,6 @@ extends Control
|
|||||||
|
|
||||||
func _on_ok_pressed():
|
func _on_ok_pressed():
|
||||||
get_tree().change_scene("res://scenes/main_menu.tscn")
|
get_tree().change_scene("res://scenes/main_menu.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func set_text(text) -> void:
|
func set_text(text) -> void:
|
||||||
|
|||||||
@ -28,5 +28,8 @@ margin_top = 13.0
|
|||||||
margin_bottom = -13.0
|
margin_bottom = -13.0
|
||||||
custom_fonts/font = ExtResource( 1 )
|
custom_fonts/font = ExtResource( 1 )
|
||||||
text = "Join"
|
text = "Join"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[connection signal="pressed" from="join_button" to="." method="_on_join_button_pressed"]
|
[connection signal="pressed" from="join_button" to="." method="_on_join_button_pressed"]
|
||||||
|
|||||||
@ -55,10 +55,10 @@ func movement(delta):
|
|||||||
if Input.is_action_just_pressed("stop"):
|
if Input.is_action_just_pressed("stop"):
|
||||||
velocity.x = 0
|
velocity.x = 0
|
||||||
velocity.y = 0
|
velocity.y = 0
|
||||||
if Input.is_action_pressed("move_left"):
|
if Input.is_action_pressed("inpt_left"):
|
||||||
if velocity.x > -MAX_SPEED:
|
if velocity.x > -MAX_SPEED:
|
||||||
velocity.x -= speed
|
velocity.x -= speed
|
||||||
elif Input.is_action_pressed("move_right"):
|
elif Input.is_action_pressed("inpt_right"):
|
||||||
if velocity.x < MAX_SPEED:
|
if velocity.x < MAX_SPEED:
|
||||||
velocity.x += speed
|
velocity.x += speed
|
||||||
|
|
||||||
@ -74,13 +74,13 @@ func movement(delta):
|
|||||||
func flying():
|
func flying():
|
||||||
var fly_speed = 1000
|
var fly_speed = 1000
|
||||||
var velocity = Vector2()
|
var velocity = Vector2()
|
||||||
if Input.is_action_pressed("move_right"):
|
if Input.is_action_pressed("inpt_right"):
|
||||||
velocity.x += 1
|
velocity.x += 1
|
||||||
if Input.is_action_pressed("move_left"):
|
if Input.is_action_pressed("inpt_left"):
|
||||||
velocity.x -= 1
|
velocity.x -= 1
|
||||||
if Input.is_action_pressed("move_down"):
|
if Input.is_action_pressed("inpt_down"):
|
||||||
velocity.y += 1
|
velocity.y += 1
|
||||||
if Input.is_action_pressed("move_up"):
|
if Input.is_action_pressed("inpt_up"):
|
||||||
velocity.y -= 1
|
velocity.y -= 1
|
||||||
velocity = velocity.normalized() * fly_speed
|
velocity = velocity.normalized() * fly_speed
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user