本文整理汇总了C++中IFireMode::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ IFireMode::GetName方法的具体用法?C++ IFireMode::GetName怎么用?C++ IFireMode::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFireMode
的用法示例。
在下文中一共展示了IFireMode::GetName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartFire
//------------------------------------------------------------------------
void CDetonate::StartFire()
{
if (CanFire(false))
{
CActor *pOwner=m_pWeapon->GetOwnerActor();
CCCPOINT(DetonateFireMode_StartFireOK);
m_pWeapon->RequireUpdate(eIUS_FireMode);
m_detonationTimer = 0.1f;
m_pWeapon->PlayAction(GetFragmentIds().fire);
m_pWeapon->RequestDetonate();
}
else
{
#if !defined(_RELEASE)
IFireMode* pFM = m_pWeapon->GetFireMode(m_pWeapon->GetCurrentFireMode());
EntityId projectileId = pFM ? pFM->GetProjectileId() : 0;
IEntity * projectile = gEnv->pEntitySystem->GetEntity(projectileId);
CryLog ("[Detonate] Failure to detonate %s '%s' (timer = %.4f, can detonate = %s, fire mode = '%s') projectile = %u (%s '%s')",
m_pWeapon->GetEntity()->GetClass()->GetName(),
m_pWeapon->GetEntity()->GetName(),
m_detonationTimer,
m_canDetonate ? "TRUE" : "FALSE",
pFM ? pFM->GetName() : "NONE",
projectileId,
projectile ? projectile->GetClass()->GetName() : "NONE",
projectile ? projectile->GetName() : "N/A");
#endif
CCCPOINT_IF(m_detonationTimer > 0.0f, DetonateFireMode_CannotFire_TimerNotReachedZero);
CCCPOINT(DetonateFireMode_CannotFire);
}
}
示例2: GetFireMode
//------------------------------------------------------------------------
int CScriptBind_Weapon::GetFireMode(IFunctionHandler *pH, int idx)
{
CWeapon *pWeapon = GetWeapon(pH);
if (!pWeapon)
return pH->EndFunction();
IFireMode* pFireMode = pWeapon->GetFireMode(idx);
if (pFireMode)
{
return pH->EndFunction(pFireMode->GetName());
}
return pH->EndFunction();
}