Improved UI

This commit is contained in:
2024-01-25 12:10:29 +01:00
parent 1d0521c0bb
commit b7e7b8abd3
11 changed files with 98 additions and 78 deletions

View File

@ -1,13 +1,18 @@
extends NetworkNode
@export var ip := "127.0.0.1"
@export var port := 4242
@export var host: String
@export var port: int
var socket := PacketPeerUDP.new()
func _init():
super._init()
socket.connect_to_host(ip, port)
func _enter_tree():
socket.connect_to_host(host, port)
for child in get_children():
if !(child is PacketHandler):
continue
set_handler(child.packet_type, child)
func _process(_delta):
while socket.get_available_packet_count() > 0: