Exemplo n.º 1
0
static void draw() {
  switch ( status ) {
  case TITLE:
    drawBackground();
    drawBoss();
    drawBulletsWake();
    drawBullets();
    startDrawBoards();
    drawSideBoards();
    drawTitle();
    endDrawBoards();
    break;
  case IN_GAME:
  case STAGE_CLEAR:
    drawBackground();
    drawBoss();
    drawLasers();
    drawShots();
    drawBulletsWake();
    drawFrags();
    drawShip();
    drawBullets();
    startDrawBoards();
    drawSideBoards();
    drawBossState();
    endDrawBoards();
    break;
  case GAMEOVER:
    drawBackground();
    drawBoss();
    drawBulletsWake();
    drawFrags();
    drawBullets();
    startDrawBoards();
    drawSideBoards();
    drawGameover();
    endDrawBoards();
    break;
  case PAUSE:
    drawBackground();
    drawBoss();
    drawLasers();
    drawShots();
    drawBulletsWake();
    drawFrags();
    drawShip();
    drawBullets();
    startDrawBoards();
    drawSideBoards();
    drawBossState();
    drawPause();
    endDrawBoards();
    break;
  }
}
Exemplo n.º 2
0
void Robot::drawRobot() {
    
    glPushMatrix();
        glTranslatef(posX,posY,posZ);
        float aux = this->m_yaw-M_PI_2;
        aux = aux*180;
        aux = aux/M_PI;
        glRotatef(-aux,0,1,0);
        glTranslatef(-posX,-posY,-posZ);
        //drawRobotHead(1.5,5,4.5,3);
        drawRobotHead(1.5,posX,posY - 0.5,posZ);
        //laserPower(posX +0.5,posY - 0.1,posZ);
        //drawRobotEyes(0.3, 4.3,5,4,1.4);
        drawRobotEyes(0.3, posX - 0.7,posY,posZ + 1,1.4);
        //drawRobotTorso(1.3, 7.0, 5,5,3);
        drawRobotTorso(torsoRadius, 7.0, posX, posY, posZ);
        //drawRobotArms(0.5, 3, 2, 4,3,3);
        drawRobotArms(0.5, 3, 2, posX - 1,posY - 2,posZ);
    glPopMatrix();
    drawLasers();
    drawFlashLight();
    //drawBoundingBox();
}