2024-01-26 22:45:26 +01:00

19 lines
305 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,
PLAYER_JUMP = 13,
PLAYER_ATTACK = 14,
}
@export var packet_type: Packet
func handle_packet(_data: PackedByteArray, _peer: PacketPeer):
pass