/** * \copydoc Detector::notify_collision */ void Stream::notify_collision(MapEntity& entity_overlapping, CollisionMode collision_mode) { const Rectangle& xy_move = direction_to_xy_move(get_direction()); entity_overlapping.notify_collision_with_stream(*this, xy_move.get_x(), xy_move.get_y()); }
/** * @brief This function is called when another entity overlaps this entity. * @param entity_overlapping the other entity * @param collision_mode the collision mode that detected the collision */ void ConveyorBelt::notify_collision(MapEntity &entity_overlapping, CollisionMode collision_mode) { const Rectangle &xy_move = direction_to_xy_move(get_direction()); entity_overlapping.notify_collision_with_conveyor_belt(*this, xy_move.get_x(), xy_move.get_y()); }
/** * \copydoc Detector::notify_collision */ void Stream::notify_collision(MapEntity& entity_overlapping, CollisionMode /* collision_mode */) { const Point& xy_move = direction_to_xy_move(get_direction()); entity_overlapping.notify_collision_with_stream(*this, xy_move.x, xy_move.y); }