本文整理汇总了C++中CActor::AnyMove方法的典型用法代码示例。如果您正苦于以下问题:C++ CActor::AnyMove方法的具体用法?C++ CActor::AnyMove怎么用?C++ CActor::AnyMove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CActor
的用法示例。
在下文中一共展示了CActor::AnyMove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void CWeapon::UpdateCL ()
{
inherited::UpdateCL ();
UpdateHUDAddonsVisibility();
//подсветка от выстрела
UpdateLight ();
//нарисовать партиклы
UpdateFlameParticles ();
UpdateFlameParticles2 ();
if(!IsGameTypeSingle())
make_Interpolation ();
if( (GetNextState()==GetState()) && IsGameTypeSingle() && H_Parent()==Level().CurrentEntity())
{
CActor* pActor = smart_cast<CActor*>(H_Parent());
if(pActor && !pActor->AnyMove() && this==pActor->inventory().ActiveItem())
{
if (hud_adj_mode==0 &&
GetState()==eIdle &&
(Device.dwTimeGlobal-m_dw_curr_substate_time>20000) &&
!IsZoomed()&&
g_player_hud->attached_item(1)==NULL)
{
if(AllowBore())
SwitchState (eBore);
ResetSubStateTime ();
}
}
}
if(m_zoom_params.m_pNight_vision && !need_renderable())
{
if(!m_zoom_params.m_pNight_vision->IsActive())
{
CActor *pA = smart_cast<CActor *>(H_Parent());
R_ASSERT(pA);
CTorch* pTorch = smart_cast<CTorch*>( pA->inventory().ItemFromSlot(TORCH_SLOT) );
if ( pTorch && pTorch->GetNightVisionStatus() )
{
m_bRememberActorNVisnStatus = pTorch->GetNightVisionStatus();
pTorch->SwitchNightVision(false, false);
}
m_zoom_params.m_pNight_vision->Start(m_zoom_params.m_sUseZoomPostprocess, pA, false);
}
}
else if(m_bRememberActorNVisnStatus)
{
m_bRememberActorNVisnStatus = false;
EnableActorNVisnAfterZoom();
}
if(m_zoom_params.m_pVision)
m_zoom_params.m_pVision->Update();
}
示例2: PlayAnimIdle
void CWeaponMagazinedWGrenade::PlayAnimIdle()
{
if(IsGrenadeLauncherAttached())
{
if(IsZoomed())
{
if(m_bGrenadeMode)
PlayHUDMotion("anm_idle_g_aim", FALSE, NULL, GetState());
else
PlayHUDMotion("anm_idle_w_gl_aim", TRUE, NULL, GetState());
}else
{
int act_state = 0;
CActor* pActor = smart_cast<CActor*>(H_Parent());
if(pActor)
{
CEntity::SEntityState st;
pActor->g_State(st);
if(st.bSprint)
{
act_state = 1;
PlayHUDMotion("anm_idle_sprint", TRUE, NULL,GetState());
}else
if(pActor->AnyMove())
{
act_state = 2;
PlayHUDMotion("anm_idle_moving", TRUE, NULL, GetState());
}
}
if(m_bGrenadeMode)
{
if(act_state==0)
PlayHUDMotion("anm_idle_g", FALSE, NULL, GetState());
else
if(act_state==1)
PlayHUDMotion("anm_idle_sprint_g", TRUE, NULL,GetState());
else
if(act_state==2)
PlayHUDMotion("anm_idle_moving_g", TRUE, NULL,GetState());
}else
{
if(act_state==0)
PlayHUDMotion("anm_idle_w_gl", FALSE, NULL, GetState());
else
if(act_state==1)
PlayHUDMotion("anm_idle_sprint_w_gl", TRUE, NULL,GetState());
else
if(act_state==2)
PlayHUDMotion("anm_idle_moving_w_gl", TRUE, NULL,GetState());
}
}
}
else
inherited::PlayAnimIdle();
}