Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2017, 1:35:53 PM (8 years ago)
Author:
pascscha
Message:

death message initiated2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc

    r11563 r11565  
    6767        point = 0;
    6868        bShowLevel = false;
     69        sDeathMessage = "hallihallo";
     70        bIsDead = true;
    6971        multiplier = 1;
    7072        b_combo = false;
     
    7779
    7880        if(this->tubes.size()==0||x-tubes.back()+tubeOffsetX>spawnDistance){
    79             orxout()<<"true: ";
    8081            spawnTube();
    8182            this->tubes.push(x+tubeOffsetX);
    8283        }
    83         else{
    84             orxout()<<"false:";
    85         }
    86         orxout()<<"x("<<x<<")- tubes.back()("<<tubes.back()<<") + tubeOffsetX("<<tubeOffsetX<<") > spawnDistance("<<spawnDistance<<")"<<std::endl;
    8784        if(this->tubes.size()!=0&&x>this->tubes.front()){
    8885            this->tubes.pop();
     
    166163
    167164    void FlappyOrx::createAsteroid(Circle &c){
    168         orxout() << "created Asteroid at x="<<c.x<<" y="<<c.y << std::endl;
    169 
    170165        MovableEntity* newAsteroid = new MovableEntity(this->center_->getContext());
    171166
     
    200195
    201196    bool FlappyOrx::isDead(){
    202         return true;
     197        return bIsDead;
    203198    }
    204199
    205200    std::string FlappyOrx::getDeathMessage(){
    206         return "hello world";
     201        return sDeathMessage;
    207202    }
    208203
     
    241236
    242237    void FlappyOrx::death(){
     238        bIsDead = true;
     239        sDeathMessage = "GameOver";
    243240        if (Highscore::exists()){
    244241                    int score = this->getPoints();
    245242                    if(score > Highscore::getInstance().getHighestScoreOfGame("Flappy Orx"))
    246243                        Highscore::getInstance().storeHighscore("Flappy Orx",score);
    247 
    248244        }
    249245        point = -1;
Note: See TracChangeset for help on using the changeset viewer.