本文整理汇总了C++中CActor::Cameras方法的典型用法代码示例。如果您正苦于以下问题:C++ CActor::Cameras方法的具体用法?C++ CActor::Cameras怎么用?C++ CActor::Cameras使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CActor
的用法示例。
在下文中一共展示了CActor::Cameras方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnZoomIn
void CWeaponMagazined::OnZoomIn()
{
inherited::OnZoomIn();
if (GetState() == eIdle)
PlayAnimIdle();
CActor* pActor = smart_cast<CActor*>(H_Parent());
if (pActor)
{
HUD_SOUND::StopSound(sndSightsUp); //daemonion - iron sight audio - sights being raised
HUD_SOUND::StopSound(sndSightsDown); //
bool b_hud_mode = (Level().CurrentEntity() == H_Parent()); //
HUD_SOUND::PlaySound(sndSightsUp, H_Parent()->Position(), H_Parent(), b_hud_mode); //--END
CEffectorZoomInertion* S = smart_cast<CEffectorZoomInertion*> (pActor->Cameras().GetCamEffector(eCEZoom));
if (!S)
{
S = (CEffectorZoomInertion*)pActor->Cameras().AddCamEffector(xr_new<CEffectorZoomInertion>());
S->Init(this);
};
S->SetRndSeed(pActor->GetZoomRndSeed());
R_ASSERT(S);
}
}
示例2:
void CWeaponMagazined::OnZoomIn ()
{
inherited::OnZoomIn();
if(GetState() == eIdle)
PlayAnimIdle();
CActor* pActor = smart_cast<CActor*>(H_Parent());
if(pActor)
{
CEffectorZoomInertion* S = smart_cast<CEffectorZoomInertion*> (pActor->Cameras().GetCamEffector(eCEZoom));
if (!S)
{
S = (CEffectorZoomInertion*)pActor->Cameras().AddCamEffector(xr_new<CEffectorZoomInertion> ());
S->Init(this);
};
S->SetRndSeed(pActor->GetZoomRndSeed());
R_ASSERT (S);
}
}
示例3: UpdateNightVisionMode
void CCustomDetector::UpdateNightVisionMode()
{
// CObject* tmp = Level().CurrentViewEntity();
bool bNightVision = false;
if (GameID() == GAME_SINGLE)
{
bNightVision = Actor()->Cameras().GetPPEffector(EEffectorPPType(effNightvision))!=NULL;
}
else
{
if (Level().CurrentViewEntity() &&
Level().CurrentViewEntity()->CLS_ID == CLSID_OBJECT_ACTOR)
{
CActor* pActor = smart_cast<CActor*>(Level().CurrentViewEntity());
if (pActor)
bNightVision = pActor->Cameras().GetPPEffector(EEffectorPPType(effNightvision))!=NULL;
}
}
bool bOn = bNightVision &&
m_pCurrentActor &&
m_pCurrentActor==Level().CurrentViewEntity()&&
IsWorking() &&
m_nightvision_particle.size();
ZONE_INFO_MAP_IT it;
for(it = m_ZoneInfoMap.begin(); m_ZoneInfoMap.end() != it; ++it)
{
CCustomZone *pZone = it->first;
ZONE_INFO& zone_info = it->second;
if(bOn){
Fvector zero_vector;
zero_vector.set(0.f,0.f,0.f);
if(!zone_info.pParticle)
zone_info.pParticle = CParticlesObject::Create(*m_nightvision_particle,FALSE);
zone_info.pParticle->UpdateParent(pZone->XFORM(),zero_vector);
if(!zone_info.pParticle->IsPlaying())
zone_info.pParticle->Play();
}else{
if(zone_info.pParticle){
zone_info.pParticle->Stop ();
CParticlesObject::Destroy(zone_info.pParticle);
}
}
}
}
示例4: OnZoomOut
void CWeaponMagazined::OnZoomOut()
{
if (!m_bZoomMode) return;
inherited::OnZoomOut();
if (GetState() == eIdle)
PlayAnimIdle();
CActor* pActor = smart_cast<CActor*>(H_Parent());
HUD_SOUND::StopSound(sndSightsUp); //daemonion - iron sight audio - sights being lowered
HUD_SOUND::StopSound(sndSightsDown); //
bool b_hud_mode = (Level().CurrentEntity() == H_Parent()); //
HUD_SOUND::PlaySound(sndSightsDown, H_Parent()->Position(), H_Parent(), b_hud_mode);//--END
if(pActor)
pActor->Cameras().RemoveCamEffector(eCEZoom);
}