Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 9, 2019, 3:29:29 PM (5 years ago)
Author:
ahuwyler
Message:

fuer de jerome

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12355 r12359  
    170170
    171171        // Set variable to temporarily force the player to spawn.
     172        // Set variable to temporarily force the player to spawn.
     173        bool temp = this->bForceSpawn_;
    172174        this->bForceSpawn_ = true;
    173175
     
    175177        Deathmatch::start();
    176178
     179        // Reset the variable.
     180        this->bForceSpawn_ = temp;
     181
    177182    }
    178183
     
    184189    {
    185190        ChatManager::message("You suck!!");
     191
     192        if (Highscore::exists())
     193        {
     194            int score = this->getScore(this->getPlayer());
     195            Highscore::getInstance().storeScore("Tetris", score, this->getPlayer());
     196        }
     197
    186198        this->cleanup();
    187199
     
    191203    }
    192204
    193     OrxoBloxShip* OrxoBlox::getPlayer()
    194     {
    195         if (playership == nullptr)
    196         {
    197             for (OrxoBloxShip* ship_ : ObjectList<OrxoBloxShip>())
    198             {
    199                 playership = ship_;
    200             }
    201         }
    202         return playership;
     205    PlayerInfo* OrxoBlox::getPlayer()
     206    {
     207        return this->player_;
    203208    }
    204209   
     
    217222    void OrxoBlox::LevelUp(){
    218223        level_++;
    219 
     224        this->playerScored(this->player_);// add points
    220225        for(OrxoBloxStones* stone : this->stones_){
    221226            int x_=(stone->getPosition()).x;
Note: See TracChangeset for help on using the changeset viewer.