diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/ponderable.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/components/ponderable.h b/src/components/ponderable.h index 5354f87..45150a0 100644 --- a/src/components/ponderable.h +++ b/src/components/ponderable.h | |||
@@ -1,11 +1,15 @@ | |||
1 | #ifndef TANGIBLE_H_746DB3EE | 1 | #ifndef TANGIBLE_H_746DB3EE |
2 | #define TANGIBLE_H_746DB3EE | 2 | #define TANGIBLE_H_746DB3EE |
3 | 3 | ||
4 | #include <set> | ||
4 | #include "component.h" | 5 | #include "component.h" |
6 | #include "entity_manager.h" | ||
5 | 7 | ||
6 | class PonderableComponent : public Component { | 8 | class PonderableComponent : public Component { |
7 | public: | 9 | public: |
8 | 10 | ||
11 | using id_type = EntityManager::id_type; | ||
12 | |||
9 | /** | 13 | /** |
10 | * List of different types of physical bodies. | 14 | * List of different types of physical bodies. |
11 | * | 15 | * |
@@ -67,6 +71,35 @@ public: | |||
67 | bool grounded = false; | 71 | bool grounded = false; |
68 | 72 | ||
69 | /** | 73 | /** |
74 | * Whether or not a freefalling body is being ferried by another body. | ||
75 | * | ||
76 | * @managed_by PonderingSystem | ||
77 | */ | ||
78 | bool ferried = false; | ||
79 | |||
80 | /** | ||
81 | * The entity that is ferrying this body, if there is one. | ||
82 | * | ||
83 | * @managed_by PonderingSystem | ||
84 | */ | ||
85 | id_type ferry; | ||
86 | |||
87 | /** | ||
88 | * The location of the body relative to the location of its ferry. | ||
89 | * | ||
90 | * @managed_by PonderingSystem | ||
91 | */ | ||
92 | double relX; | ||
93 | double relY; | ||
94 | |||
95 | /** | ||
96 | * The bodies that are being ferried by this body. | ||
97 | * | ||
98 | * @managed_by PonderingSystem | ||
99 | */ | ||
100 | std::set<id_type> passengers; | ||
101 | |||
102 | /** | ||
70 | * If enabled, this will prevent the body from moving. | 103 | * If enabled, this will prevent the body from moving. |
71 | */ | 104 | */ |
72 | bool frozen = false; | 105 | bool frozen = false; |