本文整理汇总了C++中CEntityAlive::getDestroy方法的典型用法代码示例。如果您正苦于以下问题:C++ CEntityAlive::getDestroy方法的具体用法?C++ CEntityAlive::getDestroy怎么用?C++ CEntityAlive::getDestroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEntityAlive
的用法示例。
在下文中一共展示了CEntityAlive::getDestroy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bfAssignMonsterAction
bool CBaseMonster::bfAssignMonsterAction(CScriptEntityAction *tpEntityAction)
{
if (!inherited::bfAssignMonsterAction(tpEntityAction)) return false;
CScriptMonsterAction &l_tAction = tpEntityAction->m_tMonsterAction;
if (l_tAction.completed()) return false;
CEntityAlive *pE = smart_cast<CEntityAlive *>(l_tAction.m_tObject);
switch(l_tAction.m_tAction) {
case eGA_Rest:
StateMan->force_script_state(eStateRest);
break;
case eGA_Eat:
if (pE && !pE->getDestroy() && !pE->g_Alive()){
CorpseMan.force_corpse(pE);
StateMan->force_script_state(eStateEat);
} else StateMan->force_script_state(eStateRest);
break;
case eGA_Attack:
if (pE && !pE->getDestroy() && pE->g_Alive()){
EnemyMan.force_enemy(pE);
StateMan->force_script_state(eStateAttack);
} else StateMan->force_script_state(eStateRest);
break;
case eGA_Panic:
if (pE && !pE->getDestroy() && pE->g_Alive()){
EnemyMan.force_enemy (pE);
StateMan->force_script_state (eStatePanic);
} else StateMan->force_script_state (eStateRest);
break;
}
m_script_state_must_execute = true;
return (!l_tAction.m_bCompleted);
}