本文整理汇总了C++中Trigger::UsingTriggerDir方法的典型用法代码示例。如果您正苦于以下问题:C++ Trigger::UsingTriggerDir方法的具体用法?C++ Trigger::UsingTriggerDir怎么用?C++ Trigger::UsingTriggerDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trigger
的用法示例。
在下文中一共展示了Trigger::UsingTriggerDir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void SoundManager::UpdateUI
(
void
)
{
if ( current )
{
gi.Cvar_Set( "snd_multifaceted", "" );
gi.Cvar_Set( "snd_currentfacet", "" );
gi.Cvar_Set( "snd_onetime", "0" );
gi.Cvar_Set( "snd_useangles", "0" );
gi.Cvar_Set( "snd_yaw", "0" );
gi.Cvar_Set( "snd_origin", va( "%.2f %.2f %.2f", current->origin[ 0 ], current->origin[ 1 ], current->origin[ 2 ] ) );
gi.Cvar_Set( "snd_targetname", current->targetname.c_str() );
if ( current->isSubclassOf( TriggerSpeaker ) )
{
TriggerSpeaker * speaker;
speaker = ( TriggerSpeaker * )current;
if ( speaker->volume != DEFAULT_VOL )
{
gi.Cvar_Set( "snd_volume", va( "%.1f", speaker->volume ) );
}
else
{
gi.Cvar_Set( "snd_volume", "Default" );
}
if ( speaker->min_dist != DEFAULT_MIN_DIST )
{
gi.Cvar_Set( "snd_mindist", va( "%.1f", speaker->min_dist ) );
}
else
{
gi.Cvar_Set( "snd_mindist", "Default" );
}
// setup the sound
gi.Cvar_Set( "ui_pickedsound", speaker->Noise().c_str() );
if ( current->isSubclassOf( RandomSpeaker ) )
{
RandomSpeaker * random;
random = ( RandomSpeaker * )current;
gi.Cvar_Set( "snd_mindelay", va( "%.1f", random->mindelay ) );
gi.Cvar_Set( "snd_maxdelay", va( "%.1f", random->maxdelay ) );
gi.Cvar_Set( "snd_channel", va( "%d", random->channel ) );
gi.Cvar_Set( "snd_chance", va( "%.1f", random->chance ) );
gi.Cvar_Set( "snd_type", "RandomSpeaker" );
}
else
{
gi.Cvar_Set( "snd_type", "Speaker" );
}
}
else if ( current->isSubclassOf( TriggerMusic ) || current->isSubclassOf( TriggerReverb ) )
{
int multiFaceted;
Trigger *trigger;
trigger = ( Trigger * )current;
gi.Cvar_Set( "snd_width", va( "%.0f", trigger->maxs[ 0 ] ) );
gi.Cvar_Set( "snd_length", va( "%.0f", trigger->maxs[ 1 ] ) );
gi.Cvar_Set( "snd_height", va( "%.0f", trigger->maxs[ 2 ] ) );
if ( trigger->UsingTriggerDir() )
{
gi.Cvar_Set( "snd_useangles", "1" );
}
else
{
gi.Cvar_Set( "snd_useangles", "0" );
}
gi.Cvar_Set( "snd_yaw", va( "%.0f", trigger->angles[ 1 ] ) );
multiFaceted = trigger->GetMultiFaceted();
if ( multiFaceted )
{
if ( multiFaceted == 1 )
{
gi.Cvar_Set( "snd_multifaceted", "North/South" );
if ( currentFacet )
{
gi.Cvar_Set( "snd_currentfacet", "South" );
}
else
{
gi.Cvar_Set( "snd_currentfacet", "North" );
}
}
else
{
gi.Cvar_Set( "snd_multifaceted", "East/West" );
if ( currentFacet )
{
gi.Cvar_Set( "snd_currentfacet", "West" );
}
else
{
gi.Cvar_Set( "snd_currentfacet", "East" );
}
//.........这里部分代码省略.........