17 lines
265 B
GDScript

class_name PacketHandler
extends Node
enum Packet {
INVALID = 0,
PING = 1,
LOGIN = 2,
LOGOUT = 3,
PLAYER_ADD = 10,
PLAYER_REMOVE = 11,
PLAYER_MOVE = 12,
}
@export var packet_type: Packet
func handle_packet(_data: PackedByteArray, _peer: PacketPeer):
pass