R-Type  1.0.1.0
Rewrite of the R-Type game with networking ability
Loading...
Searching...
No Matches
Player.hpp
1/*
2** EPITECH PROJECT, 2023
3** Player.hpp
4** File description:
5** Player.hpp
6*/
7
8#ifndef R_TYPE_PLAYER_HPP
9#define R_TYPE_PLAYER_HPP
10
11#include <string>
12
13namespace rtype::server::game {
14 class Player {
15 public:
16 explicit Player(int tcpId, int udpId, const std::string &name);
17
18 int getTcpId() const;
19 int getUdpId() const;
20 int getScore() const;
21 int getLife() const;
22 float getX() const;
23 float getY() const;
24 int getWidth() const;
25 int getHeight() const;
26 const std::string &getName() const;
27 bool isSceneLoaded() const;
28 bool isReady() const;
29
30 Player &setTcpId(int tcpId);
31 Player &setUdpId(int udpId);
32 Player &setScore(int score);
33 Player &setLife(int life);
34 Player &setX(float x);
35 Player &setY(float y);
36 Player &setWidth(int width);
37 Player &setHeight(int height);
38 Player &setName(const std::string &name);
39 Player &setSceneLoaded(bool sceneLoaded);
40 Player &setReady(bool ready);
41
42 private:
43 int _tcpId;
44 int _udpId;
45 int _score;
46 int _life;
47 float _x;
48 float _y;
49 int _width;
50 int _height;
51 std::string _name;
52 bool _sceneLoaded;
53 bool _ready;
54 };
55} // namespace rtype::server::game
56
57#endif // R_TYPE_PLAYER_HPP
Definition: Player.hpp:14