本文整理汇总了C++中MapEntity::is_destructible_obstacle方法的典型用法代码示例。如果您正苦于以下问题:C++ MapEntity::is_destructible_obstacle方法的具体用法?C++ MapEntity::is_destructible_obstacle怎么用?C++ MapEntity::is_destructible_obstacle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapEntity
的用法示例。
在下文中一共展示了MapEntity::is_destructible_obstacle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: is_obstacle_for
/**
* \brief Returns whether this entity is an obstacle for another one.
* \param other Another entity.
* \return \c true if this entity is an obstacle for the other one.
*/
bool Destructible::is_obstacle_for(MapEntity& other) {
return get_modified_ground() == Ground::WALL
&& !is_being_cut
&& other.is_destructible_obstacle(*this);
}
示例2: is_obstacle_for
/**
* @brief Returns whether this entity is an obstacle for another one.
*
* For a destructible item, this does not depend on the other
* entity but only on the subtype of destructible item.
*
* @param other another entity
* @return true if this entity is an obstacle for others
*/
bool Destructible::is_obstacle_for(MapEntity &other) {
return features[subtype].can_be_lifted && !is_being_cut && other.is_destructible_obstacle(*this);
}