fully sync player movements over network

This commit is contained in:
2023-01-17 13:54:26 +01:00
parent 1ef5d54d6c
commit 9893bc45b4
19 changed files with 434 additions and 62 deletions

27
scenes/GUI/start_game.gd Normal file
View File

@@ -0,0 +1,27 @@
extends Control
@onready var IPAdress_Field = $VBoxContainer/JoinContainer/IPAdress as TextEdit
signal start_game
signal back
func _on_join_button_pressed():
if not try_connection():
return
Network.start_network(false, IPAdress_Field.text)
start_game.emit()
func try_connection():
if IPAdress_Field.text.is_empty():
return false
return true
func _on_host_button_pressed():
Network.start_network(true)
start_game.emit()
func _on_back_button_pressed():
hide()
back.emit()