RType
Player.hpp
Go to the documentation of this file.
1 /*
2 ** EPITECH PROJECT, 2023
3 ** Rtype
4 ** File description:
5 ** Player.hpp
6 */
7 
8 #pragma once
9 
10 #include "Drawable.hpp"
11 #include "IObject.hpp"
12 #include <iostream>
13 
14 class Player : public Drawable, public IObject
15 {
16  public:
17 
18  /**
19  * @brief Construct a new Player:: Player object
20  * @param socket
21  */
22  explicit Player(ServerSocket *socket);
23 
24  /**
25  * @brief Destroy the Player:: Player object
26  */
27  ~Player() override = default;
28 
29  /**
30  * @brief getPacket, get the packet
31  * @return packet (Packet *)
32  */
33  [[nodiscard]] Packet *getPacket() override;
34 
35 
36  /**
37  * @brief draw, draw the player
38  */
39  void draw() override;
40 
41  private:
42  ServerSocket *socket;
43  timeval _annimationTime{};
44  float _positionX;
45  float _positionY;
46  float _direction;
47 };