// // Created by Иван Ильин on 25.05.2021. // #ifndef SHOOTER_CLIENT_H #define SHOOTER_CLIENT_H #include #include "network/ClientUDP.h" #include "Player.h" class Client : public ClientUDP { private: std::shared_ptr _player; std::shared_ptr _world; std::map> _players{}; int fireTraces = 0; public: Client(std::shared_ptr player, std::shared_ptr world) : _player(std::move(player)), _world(std::move(world)) {}; void updatePacket() override; void processInit(sf::Packet& packet) override; void processUpdate(sf::Packet& packet) override; void processNewClient(sf::Packet& packet) override; void processDisconnect(sf::Uint16 targetId) override; void processCustomPacket(MsgType type, sf::Packet& packet) override; void processDisconnected() override; void damagePlayer(sf::Uint16 targetId, double damage); void takeBonus(const std::string& bonusName); void addTrace(const Point4D& from, const Point4D& to); void deleteTrace(const std::shared_ptr &world, const std::string& traceName); }; #endif //MINECRAFT_3DZAVR_CLIENT_H