本文整理汇总了C++中Trigger::Show方法的典型用法代码示例。如果您正苦于以下问题:C++ Trigger::Show方法的具体用法?C++ Trigger::Show怎么用?C++ Trigger::Show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trigger
的用法示例。
在下文中一共展示了Trigger::Show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StepSimulation
bool Level_::StepSimulation( float timeDelta )
{
using namespace irr::core;
#ifdef _DEBUG
if (endLevelEarly) return true;
#endif
if ( inTrigger )
{
if ( !currentTrigger->Update() ) inTrigger = false;
return false;
}
else
{
if ( physics->StepSimulation( timeDelta ) )
{
// if level complete, and there is a trigger, trigger it.
// Find trigger
Trigger* exitTrigger = FindNamedTrigger("onExit");
if ( exitTrigger == NULL ) return true; // no trigger, go ahead and exit
else
{
// trigger
currentTrigger = exitTrigger;
inTrigger = true;
exitTrigger->Show();
return false;
}
}
static vector3df lastpos = ball->getPosition();
// set ball position:
vector3df position = physics->GetBallPosition();
ball->setPosition( position );
// set ball rotation (if there is a valid rotation)
static vector3df rotation;
if( physics->GetBallRotation( rotation ) )
{
ball->setRotation( rotation );
if( position.Y <= BLOCK_HALF_EXTENT + BALL_RADIUS + 0.02f &&
( abs( physics->GetBallVelocity().X ) >= 0.1f || abs( physics->GetBallVelocity().Z ) >= 0.1f ) )
{
soundSystem->PlayRollSound();
}
}
camera->setTarget( position );
//vector3df soundSysVelocity = ( position - lastpos ) / ( 1.f / 60.f );
//vector3df ballVelocity = physics->GetBallVelocity().normalize();
vector3df listenerPos = camera->getPosition();
vector3df forward = camera->getTarget();
forward.normalize();
soundSystem->Update( listenerPos.X, listenerPos.Y, listenerPos.Z, // position
forward.X, forward.Y, forward.Z, // forward
position.X, position.Y, position.Z ); // ball pos
lastpos = position;
CheckForLocationTrigger(position);
return false;
}
}