Now the spatialmap determines the 'wiggle factor' when there's multiple entities in a cell, which staggers them visually. Closes #78.
This commit is contained in:
parent
694ee210d6
commit
9c02fb846b
4 changed files with 35 additions and 21 deletions
|
@ -10,10 +10,16 @@ struct CollisionData {
|
|||
bool collision = false;
|
||||
};
|
||||
|
||||
struct EntityDistance {
|
||||
int dist_square=0;
|
||||
DinkyECS::Entity entity=DinkyECS::NONE;
|
||||
float wiggle=0.0f;
|
||||
};
|
||||
|
||||
// Point's has is in point.hpp
|
||||
using EntityList = std::vector<DinkyECS::Entity>;
|
||||
using PointEntityMap = std::unordered_multimap<Point, CollisionData>;
|
||||
using SortedEntities = std::vector<std::pair<int, DinkyECS::Entity>>;
|
||||
using SortedEntities = std::vector<EntityDistance>;
|
||||
|
||||
struct FoundEntities {
|
||||
bool found;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue