2024-01-20 21:18:58 +00:00
|
|
|
class_name PacketHandler
|
|
|
|
extends Node
|
|
|
|
|
2024-01-25 11:10:29 +00:00
|
|
|
enum Packet {
|
|
|
|
INVALID = 0,
|
|
|
|
PING = 1,
|
|
|
|
LOGIN = 2,
|
|
|
|
LOGOUT = 3,
|
|
|
|
PLAYER_STATE = 10,
|
|
|
|
PLAYER_MOVE = 11,
|
|
|
|
}
|
|
|
|
|
|
|
|
@export var packet_type: Packet
|
|
|
|
|
2024-01-20 21:18:58 +00:00
|
|
|
func handle_packet(_data: PackedByteArray, _peer: PacketPeer):
|
|
|
|
pass
|