mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-26 01:34:40 +00:00
24 lines
489 B
C++
24 lines
489 B
C++
#include "networkclient.h"
|
|
#include "playerclientdata.h"
|
|
|
|
#include <updateplayerdata.h>
|
|
|
|
int NetworkClient::loginedPlayer() const {
|
|
return _loginedPlayer;
|
|
}
|
|
|
|
void NetworkClient::handleReceiveData(ClientProtocol::Command cmd,
|
|
const QByteArray &obj) {
|
|
|
|
if (cmd == ClientProtocol::Command::Player) {
|
|
PlayerClientData data;
|
|
data.fromBytes(obj);
|
|
_playersDats[data.id()] = data;
|
|
}
|
|
|
|
}
|
|
|
|
NetworkClient::NetworkClient() {
|
|
|
|
}
|