本文整理汇总了C++中IFireMode::Enable方法的典型用法代码示例。如果您正苦于以下问题:C++ IFireMode::Enable方法的具体用法?C++ IFireMode::Enable怎么用?C++ IFireMode::Enable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFireMode
的用法示例。
在下文中一共展示了IFireMode::Enable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetUnMountedConfiguration
void CHeavyMountedWeapon::SetUnMountedConfiguration()
{
SwitchToRippedOffFireMode();
IFireMode * pMountedFireMode = GetFireMode(0);
assert(pMountedFireMode);
pMountedFireMode->Enable(false);
ExitZoom(true);
//Second zoom mode is supposed to be unmounted
if(GetZoomMode(1))
{
EnableZoomMode(1, true);
SetCurrentZoomMode(1);
}
//Just in case, it was not clear properly
CActor* pOwner = GetOwnerActor();
if ((pOwner != NULL) && pOwner->IsClient())
{
float defaultFov = 55.0f;
gEnv->pRenderer->EF_Query(EFQ_SetDrawNearFov,defaultFov);
}
}
示例2: EnableFireMode
//------------------------------------------------------------------------
int CScriptBind_Weapon::EnableFireMode(IFunctionHandler *pH, const char* name, bool enable)
{
CWeapon *pWeapon = GetWeapon(pH);
if (!pWeapon)
return pH->EndFunction();
IFireMode* pFireMode = pWeapon->GetFireMode(name);
if (pFireMode)
{
pFireMode->Enable(enable);
}
return pH->EndFunction();
}