summary refs log tree commit diff stats
path: root/src/components/playable.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/playable.h')
-rw-r--r--src/components/playable.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/components/playable.h b/src/components/playable.h index 86a7ee7..94d4326 100644 --- a/src/components/playable.h +++ b/src/components/playable.h
@@ -2,22 +2,30 @@
2#define PLAYABLE_H_DDC566C3 2#define PLAYABLE_H_DDC566C3
3 3
4#include "component.h" 4#include "component.h"
5#include <functional> 5#include "entity_manager.h"
6 6
7class PlayableComponent : public Component { 7class PlayableComponent : public Component {
8public: 8public:
9 9
10 using MapChangeCallback = std::function<void()>; 10 using id_type = EntityManager::id_type;
11 11
12 bool changingMap = false; 12 /**
13 int newMapId = -1; 13 * The entity ID of the map that the player is on.
14 double newMapX = 0; 14 *
15 double newMapY = 0; 15 * @managed_by PlayingSystem
16 MapChangeCallback newMapCallback; 16 */
17 id_type mapId;
17 18
18 int checkpointMapId = -1; 19 /**
19 double checkpointX = 0; 20 * The map ID and coordinates of the location that the player will spawn after
20 double checkpointY = 0; 21 * dying. Note that the map ID here is a world description map ID, not an
22 * entity ID.
23 *
24 * @managed_by PlayingSystem
25 */
26 size_t checkpointMapId;
27 double checkpointX;
28 double checkpointY;
21 29
22}; 30};
23 31