summary refs log tree commit diff stats
path: root/src/components/playable.h
blob: 7404f1f99d6766d6a8bdfb403befdb97e90bdc6c (plain) (blame)
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
#ifndef PLAYABLE_H_DDC566C3
#define PLAYABLE_H_DDC566C3

#include "component.h"
#include "entity_manager.h"
#include "vector.h"

class PlayableComponent : public Component {
public:

  using id_type = EntityManager::id_type;

  /**
   * The entity ID of the map that the player is on.
   *
   * @managed_by PlayingSystem
   */
  id_type mapId;

  /**
   * The map ID and coordinates of the location that the player will spawn after
   * dying. Note that the map ID here is a world description map ID, not an
   * entity ID.
   *
   * @managed_by PlayingSystem
   */
  size_t checkpointMapId;
  vec2d checkpointPos;

  bool checkpointMapObject = false;
  size_t checkpointMapObjectIndex;

};

#endif /* end of include guard: PLAYABLE_H_DDC566C3 */