本文整理汇总了C++中IshipIGC::PlotShipMove方法的典型用法代码示例。如果您正苦于以下问题:C++ IshipIGC::PlotShipMove方法的具体用法?C++ IshipIGC::PlotShipMove怎么用?C++ IshipIGC::PlotShipMove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IshipIGC
的用法示例。
在下文中一共展示了IshipIGC::PlotShipMove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
lNext = l->next();
if (s->GetPilotType() < c_ptPlayer)
m_fCost += costDrone;
else if (s->GetParentShip() != NULL)
m_fCost += costTurret;
else
{
IhullTypeIGC* pht = s->GetBaseHullType();
assert (pht);
m_fCost += pht->HasCapability(c_habmLifepod)
? costLifepod
: costPlayer;
}
s->PreplotShipMove(now);
}
if (m_fCost > 0.0f)
{
m_fCost *= dt / m_pMission->GetFloatConstant(c_fcidClusterDivisor);
}
{
//Have all ships on autopilot plot their moves. Allow ships to suicide.
ShipLinkIGC* lNext;
for (ShipLinkIGC* l = m_ships.first();
(l != NULL);
l = lNext)
{
IshipIGC* s = l->data();
lNext = l->next();
s->PlotShipMove(now);
}
}
}
{
//Have all ships execute their moves
for (ShipLinkIGC* l = m_ships.first();
(l != NULL);
l = l->next())
{
IshipIGC* s = l->data();
if (s->GetParentShip() == NULL)
{
s->ExecuteShipMove(now);
}
}
}
}
else
m_fCost = 0.0f;
{
//Call the update method on all the contained models
//models might self-terminate in the update and nuke earlier models in the update loop
//NYI debugging variables
//ObjectType oldObjectType = NA;
//ObjectType newObjectType = NA;
ModelLinkIGC* lNext;
for (ModelLinkIGC* l = m_models.first();