本文整理汇总了C++中Boss::draw方法的典型用法代码示例。如果您正苦于以下问题:C++ Boss::draw方法的具体用法?C++ Boss::draw怎么用?C++ Boss::draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Boss
的用法示例。
在下文中一共展示了Boss::draw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: render
void GameActivity::render()
{
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
// Use the negated camera position as a translation; effectively we move the world and the camera so that the camera is at 0,0,0
glTranslated(-camX, -camY, 0.0);
// Render the background
drawTiles();
//hero.boundingBox.draw();
hero.draw(playerTextureID);
//drawing Collectables
for each (Collectable c in collectables)
{
if (c.type == Collectable::Type::GUN)
{
c.draw(2);
}
else
{
c.draw(1);
}
}
//drawing each player bullet
for (int i = 0; i < hero.bullets.size(); i++)
{
//hero.bullets[i].boundingBox.draw();
hero.bullets[i].draw(bullet1ID,0.1);
}
//drawing each enemy in the vector
for (int i = 0; i < enemies.size(); i++)
{
//enemies[i].boundingBox.draw();
enemies[i].draw();
}
if (boss_flag==true)
{
boss.draw();
}
for (int i = 0; i < enemies.size(); i++)
{
for (int j = 0; j < enemies[i].bullets.size(); j++)
{
//enemies[i].bullets[j].boundingBox.draw();
enemies[i].bullets[j].draw(bullet2ID, 0.3);
}
}
renderHUD();
glFlush();
}
示例2: display
void display( )
{
switch( DisplayMode )
{
case GAME:
{
glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
drawLightPosition();
//drawCoordinateSystem();
// Note that drawing order has consequences for 'transparancy'
background->draw();
for (int i = 0; i < numberOfRidges; i++)
{
mountains[i].draw();
}
groundfloor->draw();
if (toggleBoss)
boss.draw();
glDisable(GL_DEPTH_TEST);
for (auto &projectile : projectiles) {
projectile.draw();
}
glEnable(GL_DEPTH_TEST);
character.draw();
for (auto &enemy : enemies) {
enemy.draw();
}
break;
}
case MESH:
{
glEnable(GL_LIGHTING);
glPushMatrix();
//David:
//glRotatef(-90.0f, 0.0f, 0.0f, 1.0f);
//glRotatef(-90.0f, 0.0f, 1.0f, 0.0f);
//hoofd
//glRotatef(90.0f, 0.0f, 0.0f, 1.0f);
//glRotatef(-90.0f, 1.0f, 0.0f, 0.0f);
meshes[meshIndex].drawSmooth();
glPopMatrix();
glDisable(GL_LIGHTING);
break;
}
default:
break;
}
}