diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-19 16:22:39 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-19 16:22:39 -0500 |
commit | 8996810b1356c2224d4f34423fd4211de20da238 (patch) | |
tree | 9beab3f77e6af1c769e14cff4234ad649cf857f2 /src/entity.h | |
parent | 7514077a07076403f29050e57fa87f24fc614122 (diff) | |
download | dispatcher-8996810b1356c2224d4f34423fd4211de20da238.tar.gz dispatcher-8996810b1356c2224d4f34423fd4211de20da238.tar.bz2 dispatcher-8996810b1356c2224d4f34423fd4211de20da238.zip |
Restrictions for moving into a space a block is moving out of
An entity can only move into a space a block is moving out of if the time it would take the entity to move into the tile is at least the time remaining for the other block to finish moving out of the space. Also, crates can push each other now.
Diffstat (limited to 'src/entity.h')
-rw-r--r-- | src/entity.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/entity.h b/src/entity.h index 0ff31e1..b606b43 100644 --- a/src/entity.h +++ b/src/entity.h | |||
@@ -1,21 +1,9 @@ | |||
1 | #ifndef ENTITY_H_0D6CB29A | 1 | #ifndef ENTITY_H_0D6CB29A |
2 | #define ENTITY_H_0D6CB29A | 2 | #define ENTITY_H_0D6CB29A |
3 | 3 | ||
4 | #include <set> | ||
4 | #include "vector.h" | 5 | #include "vector.h" |
5 | 6 | #include "enums.h" | |
6 | enum class ColliderType { | ||
7 | player, | ||
8 | train, | ||
9 | other | ||
10 | }; | ||
11 | |||
12 | enum class Direction { | ||
13 | none, | ||
14 | left, | ||
15 | right, | ||
16 | up, | ||
17 | down | ||
18 | }; | ||
19 | 7 | ||
20 | class Entity { | 8 | class Entity { |
21 | public: | 9 | public: |
@@ -39,9 +27,7 @@ public: | |||
39 | 27 | ||
40 | // Collision | 28 | // Collision |
41 | ColliderType colliderType = ColliderType::other; | 29 | ColliderType colliderType = ColliderType::other; |
42 | 30 | std::set<ColliderType> canBePushedBy; | |
43 | bool playerCanPush = false; | ||
44 | bool trainCanPush = false; | ||
45 | 31 | ||
46 | // Temp | 32 | // Temp |
47 | int colorVal = 25; | 33 | int colorVal = 25; |