16 lines
246 B
GDScript
16 lines
246 B
GDScript
class_name PacketHandler
|
|
extends Node
|
|
|
|
enum Packet {
|
|
INVALID = 0,
|
|
PING = 1,
|
|
LOGIN = 2,
|
|
LOGOUT = 3,
|
|
PLAYER_STATE = 10,
|
|
PLAYER_MOVE = 11,
|
|
}
|
|
|
|
@export var packet_type: Packet
|
|
|
|
func handle_packet(_data: PackedByteArray, _peer: PacketPeer):
|
|
pass |