diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-20 16:44:09 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-20 16:44:09 -0500 |
commit | d9c201cbf2fbfe315137e141d886a9bbfa6794ba (patch) | |
tree | 2dfaf8db9e43e456386796d797884ea18d63befe /src/entity.h | |
parent | 8996810b1356c2224d4f34423fd4211de20da238 (diff) | |
download | dispatcher-d9c201cbf2fbfe315137e141d886a9bbfa6794ba.tar.gz dispatcher-d9c201cbf2fbfe315137e141d886a9bbfa6794ba.tar.bz2 dispatcher-d9c201cbf2fbfe315137e141d886a9bbfa6794ba.zip |
Started implementing schedule
Scheduled entities move downward every beat, although they have a speed that is twice the bpm, so essentially they move every other beat? Broke the simulation loop such that different parts run independently -- made it horizontal rather than vertical. Encapsulated the grid cache so that more than one position field could be cached. This is used to make sure that an entity can't move into a space that something else is already moving into. Fixed issue where an entity could move perpendicularly into the space an entity was moving out of.
Diffstat (limited to 'src/entity.h')
-rw-r--r-- | src/entity.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/entity.h b/src/entity.h index b606b43..a69c612 100644 --- a/src/entity.h +++ b/src/entity.h | |||
@@ -21,6 +21,7 @@ public: | |||
21 | vec2s destPos; | 21 | vec2s destPos; |
22 | double movementTween = 0.0; | 22 | double movementTween = 0.0; |
23 | double speed = 0.0; // Tiles per second | 23 | double speed = 0.0; // Tiles per second |
24 | Direction moveDir = Direction::none; | ||
24 | 25 | ||
25 | // Player | 26 | // Player |
26 | bool controllable = false; | 27 | bool controllable = false; |
@@ -32,6 +33,8 @@ public: | |||
32 | // Temp | 33 | // Temp |
33 | int colorVal = 25; | 34 | int colorVal = 25; |
34 | 35 | ||
36 | bool scheduled = false; | ||
37 | |||
35 | }; | 38 | }; |
36 | 39 | ||
37 | #endif /* end of include guard: ENTITY_H_0D6CB29A */ | 40 | #endif /* end of include guard: ENTITY_H_0D6CB29A */ |