diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-17 15:55:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-17 15:55:37 -0400 |
commit | 90aadf3844386824140a20d7fbb847bc16009a94 (patch) | |
tree | 6f83fce90e71abb22b1a8f3e09c79963b2a34d5d /src/components/transformable.h | |
parent | bc63fa57ced1c7329f7fdcfd168eaf7e290158bc (diff) | |
parent | 86f0106d0523825549f1e74b835688c78a10cf6c (diff) | |
download | therapy-90aadf3844386824140a20d7fbb847bc16009a94.tar.gz therapy-90aadf3844386824140a20d7fbb847bc16009a94.tar.bz2 therapy-90aadf3844386824140a20d7fbb847bc16009a94.zip |
Merge pull request #7 from hatkirby/es-rewrite
The ECS rewrite exceeds the original branch in functionality, so it is time to merge it in.
Diffstat (limited to 'src/components/transformable.h')
-rw-r--r-- | src/components/transformable.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/components/transformable.h b/src/components/transformable.h new file mode 100644 index 0000000..bb21996 --- /dev/null +++ b/src/components/transformable.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef LOCATABLE_H_39E526CA | ||
2 | #define LOCATABLE_H_39E526CA | ||
3 | |||
4 | #include "component.h" | ||
5 | #include "vector.h" | ||
6 | |||
7 | class TransformableComponent : public Component { | ||
8 | public: | ||
9 | |||
10 | /** | ||
11 | * The coordinates of the entity. | ||
12 | * | ||
13 | * Note that ponderable entities sometimes have special behavior related to | ||
14 | * their coordinates, specifically that ferried bodies will behave oddly if | ||
15 | * their coordinates are changed outside of the PonderingSystem. Before doing | ||
16 | * so, use PonderingSystem::unferry on the body to ensure that it is not | ||
17 | * ferried. | ||
18 | */ | ||
19 | vec2d pos; | ||
20 | |||
21 | /** | ||
22 | * The size of the entity. | ||
23 | */ | ||
24 | vec2i size; | ||
25 | |||
26 | /** | ||
27 | * For prototypes, the original coordinates and size of the entity. | ||
28 | * | ||
29 | * @managed_by RealizingSystem | ||
30 | */ | ||
31 | vec2d origPos; | ||
32 | vec2i origSize; | ||
33 | }; | ||
34 | |||
35 | #endif /* end of include guard: LOCATABLE_H_39E526CA */ | ||