本文整理汇总了C++中IshipIGC::ApplyMineDamage方法的典型用法代码示例。如果您正苦于以下问题:C++ IshipIGC::ApplyMineDamage方法的具体用法?C++ IshipIGC::ApplyMineDamage怎么用?C++ IshipIGC::ApplyMineDamage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IshipIGC
的用法示例。
在下文中一共展示了IshipIGC::ApplyMineDamage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
{
Time timeCollision = m_lastUpdate + (m_tOffset + entry.m_tCollision);
ImodelIGC* pModelHitTest1 = (ImodelIGC*)(entry.m_pHitTest1->GetData());
assert (pModelHitTest1);
ImodelIGC* pModelHitTest2 = (ImodelIGC*)(entry.m_pHitTest2->GetData());
assert (pModelHitTest2);
//Give each participant in the collision a chance to handle the collision
//but give the "1st" model first dibs.
if ((pModelHitTest1->GetCluster() == this) &&
(pModelHitTest2->GetCluster() == this))
{
pModelHitTest1->HandleCollision(timeCollision, entry.m_tCollision, entry, pModelHitTest2);
}
}
}
m_collisions.purge();
}
{
//Apply any damage from mines
//Kids always follow parents in the ship list, so go from back to front
//so that the killing a parent doesn't mean hitting dead elements in the list
ShipLinkIGC* lTxen;
for (ShipLinkIGC* l = m_ships.last();
(l != NULL);
l = lTxen)
{
IshipIGC* s = l->data();
lTxen = l->txen();
s->ApplyMineDamage();
}
}
//Move each object & projectile
{
for (ModelLinkIGC* l = m_models.first();
(l != NULL);
l = l->next())
{
l->data()->Move();
}
}
if ((m_nPass++) % c_nPassesPerUpdate == 0)
{
for (ModelLinkIGC* l = m_models.first();
(l != NULL);
l = l->next())
{
l->data()->UpdateSeenBySide();
}
m_pMission->GetIgcSite()->ClusterUpdateEvent(this);
}
}
//Draw and resolve any explosions
if (m_nExplosions != 0)
{
const int c_maxDmgs = 500;
IdamageIGC* pdmgs[c_maxDmgs];