17 #ifndef HEADER_SUPERTUX_COLLISION_COLLISION_MOVEMENT_MANAGER_HPP 18 #define HEADER_SUPERTUX_COLLISION_COLLISION_MOVEMENT_MANAGER_HPP 20 #include "collision/collision_object.hpp" 21 #include "object/tilemap.hpp" 22 #include "math/vector.hpp" 24 #include <unordered_map> 37 class TargetMovementData final
40 TargetMovementData() :
45 void register_movement(
CollisionObject& moving_object,
const Vector& movement);
46 void register_movement(
TileMap& moving_tilemap,
const Vector& movement);
48 const std::unordered_map<CollisionObject*, Vector>& get_objects_map()
const 50 return m_moving_objects;
53 const std::unordered_map<TileMap*, Vector>& get_tilemaps_map()
const 55 return m_moving_tilemaps;
59 std::unordered_map<CollisionObject*, Vector> m_moving_objects;
60 std::unordered_map<TileMap*, Vector> m_moving_tilemaps;
66 m_movements_per_target()
84 std::unordered_map<CollisionObject*, TargetMovementData> m_movements_per_target;
This class takes care of moving objects that have collided on top of other moving objects or on top o...
Definition: collision_movement_manager.hpp:32
void apply_all_ground_movement()
Moves all target objects according to their colliding object or tilemap whose movement vector has the...
Definition: collision_movement_manager.cpp:39
Definition: collision_object.hpp:33
This class is responsible for managing an array of tiles.
Definition: tilemap.hpp:49