예제 #1
0
/**
 * @brief This function is called when some stairs detect a collision with this entity.
 * @param stairs the stairs entity
 * @param collision_mode the collision mode that detected the event
 */
void CarriedItem::notify_collision_with_stairs(Stairs &stairs, CollisionMode collision_mode) {

  if (is_throwing && !is_breaking
      && stairs.is_inside_floor() && get_layer() == LAYER_LOW) {
    break_on_intermediate_layer = true; // show the destruction animation above the stairs
  }
}
예제 #2
0
/**
 * \brief This function is called when some stairs detect a collision with this entity.
 * \param stairs the stairs entity
 * \param collision_mode the collision mode that detected the event
 */
void CarriedItem::notify_collision_with_stairs(Stairs& stairs, CollisionMode /* collision_mode */) {

  if (is_throwing
      && !is_breaking
      && stairs.is_inside_floor()
      && get_layer() == stairs.get_layer()) {
    break_one_layer_above = true; // show the destruction animation above the stairs
  }
}
예제 #3
0
/**
 * \brief Returns whether some stairs are currently considered as an obstacle for this entity.
 * \param stairs an stairs entity
 * \return true if the stairs are currently an obstacle for this entity
 */
bool Boomerang::is_stairs_obstacle(const Stairs& stairs) const {
  return stairs.is_inside_floor() && get_layer() == LAYER_LOW;
}
예제 #4
0
파일: Arrow.cpp 프로젝트: Arseth/solarus
/**
 * \brief Returns whether some stairs are currently considered as an obstacle for this entity.
 * \param stairs an stairs entity
 * \return true if the stairs are currently an obstacle for this entity
 */
bool Arrow::is_stairs_obstacle(Stairs& stairs) {
  return stairs.is_inside_floor() && get_layer() == LAYER_LOW;
}
예제 #5
0
/**
 * \brief Returns whether some stairs are currently considered as an obstacle for this entity.
 * \param stairs an stairs entity
 * \return true if the stairs are currently an obstacle for this entity
 */
bool Boomerang::is_stairs_obstacle(Stairs& stairs) {
  return stairs.is_inside_floor() && get_layer() == stairs.get_layer();
}