Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 17, 2018, 4:14:35 PM (7 years ago)
Author:
dreherm
Message:

HUD erweitert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc

    r11961 r11976  
    6868        if (this->PacmanGame)
    6969        {
    70                 if(this->bShowPoints_){
     70            bool death = this->PacmanGame->isdead();
     71            if(death){
     72                bShowPoints_ = false;
     73                bShowGhoststatus_ = false;
     74                const std::string& deathmessage = "Game Over";
     75                    setTextSize(0.4);
     76                    this->setCaption(deathmessage);
     77            }
     78           
     79            if(this->bShowPoints_ && !death) {
    7180                    const std::string& points = "Collected points: "+multi_cast<std::string>(this->PacmanGame->getPoints()) + " of " + multi_cast<std::string>(this->PacmanGame->totallevelpoint);
    7281                    setTextSize(0.04);
    7382                    this->setCaption(points);
    74                 }
    75                 if(this->bShowGhoststatus_){
     83            }
     84 
     85            if(this->bShowGhoststatus_ && !death){
    7686                    const std::string& ghoststatus = "Do not get caught!";
    77                     //if(this->PacmanGame->afraid) const std::string& ghoststatus = "Catch the ghosts!";
    78                     orxout() << "Test Hier" << endl;
     87                    if(this->PacmanGame->afraid) const std::string& ghoststatus = "Catch the ghosts!";
    7988                    setTextSize(0.04);
    8089                    this->setCaption(ghoststatus);
    81                 }
     90            }
    8291        }
    8392    }   
Note: See TracChangeset for help on using the changeset viewer.