/** * \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(Stairs& stairs) { return stairs.is_inside_floor() && get_layer() == stairs.get_layer(); }