/** * @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 } }
/** * \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 } }
/** * \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; }
/** * \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; }
/** * \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(); }