本文整理汇总了C++中ParticleManager::Draw方法的典型用法代码示例。如果您正苦于以下问题:C++ ParticleManager::Draw方法的具体用法?C++ ParticleManager::Draw怎么用?C++ ParticleManager::Draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParticleManager
的用法示例。
在下文中一共展示了ParticleManager::Draw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void BasicApp::draw()
{
// this pair of lines is the standard way to clear the screen in OpenGL
gl::clear( Color( 0.0f, 0.0f, 0.0f ) );
gl::setMatricesWindow( getWindowSize() );
if(game_state == Game_Demo)
{
gl::enableAlphaBlending( true );
for (list<Asteroid>::iterator itr = asteroids.begin(); itr!=asteroids.end(); itr++)
{
if(itr->m_bHit)
{
}
itr->Draw();
}
Font font = Font( "Times New Roman", 50 );
gl::drawString("Atari Asteroids Clone" , Vec2f(app::getWindowWidth()/4,app::getWindowHeight()/4),cinder::ColorA(1,1,1,1), font);
gl::drawString("Presse SpaceBar to Play" , Vec2f(app::getWindowWidth()/4,app::getWindowHeight()/2 + 100),cinder::ColorA(1,1,1,1), font);
}
else if(game_state == GAME_Play)
{
for (list<Asteroid>::iterator itr = asteroids.begin(); itr!=asteroids.end(); itr++)
{
if(itr->m_bHit)
{
}
itr->Draw();
}
enemy.Draw();
particleManager.Move();
particleManager.Draw();
particleLineManager.Update();
particleLineManager.Draw();
currentShip.Draw();
for (std::vector<Ship>::iterator itrShip = ships.begin(); itrShip!=ships.end();itrShip++)
{
if(itrShip->m_state== Ship::Ship_Alive)
{
itrShip->Draw();
}
}
stringstream scoreString;
scoreString<< score;
gl::drawString(" " + scoreString.str(), Vec2f(10,10),cinder::ColorA(1,1,1,1), mFont);
}
else if (game_state == GAME_End)
{
gl::drawString("Game Over", Vec2f(getWindowWidth()/2,getWindowHeight()/2),cinder::ColorA(1,1,1,1), mFont);
}
}