本文整理汇总了C++中Sprite::GetUnzoomedHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ Sprite::GetUnzoomedHeight方法的具体用法?C++ Sprite::GetUnzoomedHeight怎么用?C++ Sprite::GetUnzoomedHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sprite
的用法示例。
在下文中一共展示了Sprite::GetUnzoomedHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromAniLayerFile
//.........这里部分代码省略.........
case EFFECT_STRETCH_SCROLL_UP: m_fTexCoordVelocityX = 0; m_fTexCoordVelocityY = +0.5f; break;
case EFFECT_STRETCH_SCROLL_DOWN: m_fTexCoordVelocityX = 0; m_fTexCoordVelocityY = -0.5f; break;
default: break;
}
}
break;
case EFFECT_STRETCH_SPIN:
{
m_Type = TYPE_SPRITE;
Sprite* pSprite = new Sprite;
this->AddChild( pSprite );
pSprite->Load( Sprite::SongBGTexture(sPath) );
const RectF StretchedFullScreenRectF(
FullScreenRectF.left-200,
FullScreenRectF.top-200,
FullScreenRectF.right+200,
FullScreenRectF.bottom+200 );
pSprite->ScaleToCover( StretchedFullScreenRectF );
pSprite->SetEffectSpin( RageVector3(0,0,60) );
}
break;
case EFFECT_PARTICLES_SPIRAL_OUT:
case EFFECT_PARTICLES_SPIRAL_IN:
case EFFECT_PARTICLES_FLOAT_UP:
case EFFECT_PARTICLES_FLOAT_DOWN:
case EFFECT_PARTICLES_FLOAT_LEFT:
case EFFECT_PARTICLES_FLOAT_RIGHT:
case EFFECT_PARTICLES_BOUNCE:
{
m_Type = TYPE_PARTICLES;
Sprite s;
s.Load( sPath );
int iSpriteArea = int( s.GetUnzoomedWidth()*s.GetUnzoomedHeight() );
const int iMaxArea = int(SCREEN_WIDTH*SCREEN_HEIGHT);
int iNumParticles = iMaxArea / iSpriteArea;
iNumParticles = min( iNumParticles, MAX_SPRITES );
for( int i=0; i<iNumParticles; i++ )
{
Sprite* pSprite = new Sprite;
this->AddChild( pSprite );
pSprite->Load( sPath );
pSprite->SetZoom( 0.7f + 0.6f*i/(float)iNumParticles );
switch( effect )
{
case EFFECT_PARTICLES_BOUNCE:
pSprite->SetX( randomf( GetGuardRailLeft(pSprite), GetGuardRailRight(pSprite) ) );
pSprite->SetY( randomf( GetGuardRailTop(pSprite), GetGuardRailBottom(pSprite) ) );
break;
default:
pSprite->SetX( randomf( GetOffScreenLeft(pSprite), GetOffScreenRight(pSprite) ) );
pSprite->SetY( randomf( GetOffScreenTop(pSprite), GetOffScreenBottom(pSprite) ) );
break;
}
switch( effect )
{
case EFFECT_PARTICLES_FLOAT_UP:
case EFFECT_PARTICLES_SPIRAL_OUT:
m_vParticleVelocity.push_back( RageVector3( 0, -PARTICLE_SPEED*pSprite->GetZoom(), 0 ) );
break;
case EFFECT_PARTICLES_FLOAT_DOWN:
case EFFECT_PARTICLES_SPIRAL_IN:
m_vParticleVelocity.push_back( RageVector3( 0, PARTICLE_SPEED*pSprite->GetZoom(), 0 ) );
break;