20 lines
298 B
GDScript3
Raw Normal View History

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,
2024-01-26 11:50:46 +00:00
PLAYER_ADD = 10,
PLAYER_REMOVE = 11,
PLAYER_MOVE = 12,
2024-01-26 21:45:26 +00:00
PLAYER_JUMP = 13,
PLAYER_ATTACK = 14,
2024-01-28 21:08:08 +00:00
CHAT = 20,
2024-01-25 11:10:29 +00:00
}
@export var packet_type: Packet
2024-01-29 22:16:06 +00:00
func handle_packet(_data: PackedByteArray):
2024-01-20 21:18:58 +00:00
pass