本文整理汇总了C++中MoverPtr::getAwake方法的典型用法代码示例。如果您正苦于以下问题:C++ MoverPtr::getAwake方法的具体用法?C++ MoverPtr::getAwake怎么用?C++ MoverPtr::getAwake使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MoverPtr
的用法示例。
在下文中一共展示了MoverPtr::getAwake方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: statusCount
void Team::statusCount(int32_t* statusTally)
{
//----------------------------------------------------------
// statusTally counts the number of objects in the team with
// each of the statuses...
for(size_t i = 0; i < rosterSize; i++)
{
MoverPtr obj = (MoverPtr)ObjectManager->getByWatchID(roster[i]);
Assert(obj != nullptr, i, " Team.statusCount: nullptr roster object ");
MechWarriorPtr pilot = obj->getPilot();
if(!obj->getExists())
statusTally[8]++;
else if(!obj->getAwake())
statusTally[7]++;
else if(pilot && (pilot->getStatus() == WARRIOR_STATUS_WITHDRAWN))
statusTally[6]++;
else
{
int32_t status = obj->getStatus();
if((status < 0) || (status > 5))
Fatal(status, " Status out of bounds ");
statusTally[obj->getStatus()]++;
}
}
}
示例2: statusCount
void MoverGroup::statusCount (long* statusTally) {
for (long i = 0; i < numMovers; i++) {
MoverPtr mover = getMover(i);
MechWarriorPtr pilot = mover->getPilot();
if (!mover->getExists())
statusTally[8]++;
else if (!mover->getAwake())
statusTally[7]++;
else if (pilot && (pilot->getStatus() == WARRIOR_STATUS_WITHDRAWN))
statusTally[6]++;
else
statusTally[mover->getStatus()]++;
}
}