Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 25, 2013, 6:51:39 PM (10 years ago)
Author:
zifloria
Message:

points, level up, hud

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/invaders/src/modules/invader/Invader.cc

    r9828 r9829  
    6464        this->setHUDTemplate("InvaderHUD");
    6565
     66        lives = 3;
     67        level = 1;
     68        point = 0;
     69        multiplier = 1;
     70        b_combo = false;
    6671        enemySpawnTimer.setTimer(2.0f, true, createExecutor(createFunctor(&Invader::spawnEnemy, this)));
     72        comboTimer.setTimer(2.5f, true, createExecutor(createFunctor(&Invader::comboControll, this)));
    6773    }
    6874
     
    8591
    8692        newPawn->setPosition(player->getPosition() + Vector3(1000, 0, 0)); // BUG:
     93    }
     94
     95    void Invader::comboControll()
     96    {
     97        if (b_combo)
     98            multiplier++;
     99        else
     100            multiplier = 1;
     101        b_combo = false;
    87102    }
    88103
Note: See TracChangeset for help on using the changeset viewer.