-
Notifications
You must be signed in to change notification settings - Fork 0
/
Proximity.h
47 lines (38 loc) · 1.04 KB
/
Proximity.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// Created by Ed on 02/01/2024.
//
#ifndef PROXIMITY_H
#define PROXIMITY_H
#include <connection.h>
#include <string>
#include "Renderable.h"
#include "RenderableText.h"
class Proximity : Renderable {
public:
explicit Proximity(const std::string &symbol);
~Proximity() override;
void set_entity(const std::string& entity);
void fetch(RestClient::Connection *connection);
void render(SDL_Renderer* renderer) override;
void set_pos(int x, int y) override;
[[nodiscard]] bool is_interesting() const;
[[nodiscard]] int h() const override;
[[nodiscard]] int w() const override;
[[nodiscard]] int x() const override;
[[nodiscard]] int y() const override;
private:
std::string m_entity;
bool m_travelling;
int m_proximity;
time_t m_start_time;
time_t m_poll_time;
int m_start_proximity;
double m_speed;
int m_x;
int m_y;
RenderableText *m_startSymbol;
RenderableText *m_endSymbol;
RenderableText *m_travellerSymbol;
RenderableText *m_eta;
};
#endif //PROXIMITY_H