예제 #1
0
/**
 * \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());
}
예제 #2
0
/**
 * @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());
}
예제 #3
0
/**
 * \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);
}