From d9c201cbf2fbfe315137e141d886a9bbfa6794ba Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 20 Feb 2019 16:44:09 -0500 Subject: 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. --- src/entity.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/entity.h') 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: vec2s destPos; double movementTween = 0.0; double speed = 0.0; // Tiles per second + Direction moveDir = Direction::none; // Player bool controllable = false; @@ -32,6 +33,8 @@ public: // Temp int colorVal = 25; + bool scheduled = false; + }; #endif /* end of include guard: ENTITY_H_0D6CB29A */ -- cgit 1.4.1