本文整理汇总了C++中ItemType::isLevelDoor方法的典型用法代码示例。如果您正苦于以下问题:C++ ItemType::isLevelDoor方法的具体用法?C++ ItemType::isLevelDoor怎么用?C++ ItemType::isLevelDoor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ItemType
的用法示例。
在下文中一共展示了ItemType::isLevelDoor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDescription
//.........这里部分代码省略.........
if (lookDistance <= 4)
{
if (item->getWriter().length())
{
s << item->getWriter() << " wrote";
time_t wDate = item->getWrittenDate();
if (wDate > 0)
{
char date[16];
formatDateShort(wDate, date);
s << " on " << date;
}
s << ": ";
}
else
{
s << "You read: ";
}
s << item->getText();
}
else
{
s << "You are too far away to read it.";
}
}
else
{
s << "Nothing is written on it.";
}
}
else if (it.isLevelDoor() && item && item->getActionId() >= 1000)
{
s << " for level " << item->getActionId() - 1000;
}
else if (it.showCharges)
{
if (subType > 1)
{
s << " that has " << (int32_t)subType << " charges left.";
}
else
{
s << " that has 1 charge left.";
}
}
else if (it.showDuration)
{
if (item && item->hasAttribute(ATTR_ITEM_DURATION))
{
int32_t duration = item->getDuration() / 1000;
s << " that has energy for ";
if (duration >= 120)
{
s << duration / 60 << " minutes left.";
}
else if (duration > 60)
{
s << "1 minute left.";
}
else
{
s << "less than a minute left.";