diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-22 17:25:59 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-22 17:25:59 -0500 |
commit | 26fbd8c1edaf94513d9750681edbe449b699efe4 (patch) | |
tree | 3356e61d3eca5eda067169a2c584616a49d8e5a5 /src/entity.h | |
parent | d9c201cbf2fbfe315137e141d886a9bbfa6794ba (diff) | |
download | dispatcher-26fbd8c1edaf94513d9750681edbe449b699efe4.tar.gz dispatcher-26fbd8c1edaf94513d9750681edbe449b699efe4.tar.bz2 dispatcher-26fbd8c1edaf94513d9750681edbe449b699efe4.zip |
Trains move on tracks to the beat
Small implementation changes in various places, biggest thing is now we're using ranges, which is experimental and will be included for real in C++20.
Diffstat (limited to 'src/entity.h')
-rw-r--r-- | src/entity.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/entity.h b/src/entity.h index a69c612..c47f1e7 100644 --- a/src/entity.h +++ b/src/entity.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <set> | 4 | #include <set> |
5 | #include "vector.h" | 5 | #include "vector.h" |
6 | #include "enums.h" | 6 | #include "enums.h" |
7 | #include "direction.h" | ||
7 | 8 | ||
8 | class Entity { | 9 | class Entity { |
9 | public: | 10 | public: |
@@ -14,6 +15,7 @@ public: | |||
14 | 15 | ||
15 | // Grid placement | 16 | // Grid placement |
16 | vec2s gridPos; | 17 | vec2s gridPos; |
18 | Layer layer = Layer::object; | ||
17 | 19 | ||
18 | // Movement | 20 | // Movement |
19 | Direction shouldMoveTo = Direction::none; | 21 | Direction shouldMoveTo = Direction::none; |
@@ -35,6 +37,11 @@ public: | |||
35 | 37 | ||
36 | bool scheduled = false; | 38 | bool scheduled = false; |
37 | 39 | ||
40 | // Track | ||
41 | bool isTrack = false; | ||
42 | Direction trackDir1 = Direction::none; | ||
43 | Direction trackDir2 = Direction::none; | ||
44 | |||
38 | }; | 45 | }; |
39 | 46 | ||
40 | #endif /* end of include guard: ENTITY_H_0D6CB29A */ | 47 | #endif /* end of include guard: ENTITY_H_0D6CB29A */ |