Example #1
0
void level::drawAll()
{
    drawGrid();
    if (playerShip->isAlive())
    {
        displayLife();
        playerShip->draw();
        playerShip->drawUpgradeRing(fireUpgradeList,lifeUpgradeList);
        clipArroundShip();

    }
    else
    {
        saveHighScore();
        shipExplode(playerShip->get_pos());
    }
    for_each(drawableList.begin(),drawableList.end(),draw_all);
    for_each(fireList.begin(),fireList.end(),draw_all);
    for_each(fireUpgradeList.begin(),fireUpgradeList.end(),draw_all);
    for_each(lifeUpgradeList.begin(),lifeUpgradeList.end(),draw_all);
    for_each(enemyList.begin(),enemyList.end(),draw_all);
}
Example #2
0
void ArcadeMode::saveScore() {
    saveHighScore(HUDLayer->getScore());
}