fully sync player movements over network
This commit is contained in:
27
scenes/GUI/start_game.gd
Normal file
27
scenes/GUI/start_game.gd
Normal 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()
|
||||
Reference in New Issue
Block a user