本文整理汇总了C++中PlayerEntity::getSeatNum方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerEntity::getSeatNum方法的具体用法?C++ PlayerEntity::getSeatNum怎么用?C++ PlayerEntity::getSeatNum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerEntity
的用法示例。
在下文中一共展示了PlayerEntity::getSeatNum方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: missilePass
//魔弹传递
void BackgroundEngine::missilePass(bool rightOrder,int dst,int src,bool* passed,int missilePoint)
{
int i;
PlayerEntity* srcPlayer = getPlayerByID(src);
PlayerEntity* dstPlayer = getPlayerByID(dst);
PlayerEntity* next = dstPlayer;
passed[srcPlayer->getSeatNum()] = true;
for(i = 0;i < this->playerList.size();i++)
{
if(!*(passed+i) && (i != dstPlayer->getSeatNum()))
break;
}
if(i == this->playerList.size())
{
for(int j = 0;j < this->playerList.size();j++)
*(passed + j) = false;
}
if(rightOrder)
{
while((next->getColor() == dstPlayer->getColor()) || *(passed + next->getSeatNum()))
next = next->getNext();
coder.askForMissile(dst,src,missilePoint,next->getID());
}
else
{
while((next->getColor() == dstPlayer->getColor()) || passed[next->getSeatNum()])
next = this->getFront(next);
coder.askForMissile(dst,src,missilePoint,next->getID());
}
}