Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 4, 2017, 3:17:59 PM (8 years ago)
Author:
jkindle
Message:

Fixed turning, added and finished Gumbas, added turnOnCollide for all NPC and items, added Flagstone - todo: add points on flagstone hit and go into a between lvl mode, then warp to lvl 2. AAH, and added onDeath fcts…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOBHUDInfo.cc

    r11405 r11412  
    6666          if (this->type_ == "Coins") {
    6767                // this->setCaption("Game ends in 30 seconds.\nPress (e)xit / (q)uit to go to the main menu.\nTo restart fly out of the screen!");
    68                    
    69                    
     68           
     69           
    7070            std::stringstream ss;
    7171            ss << "cc x " << std::setw(2) << std::setfill('0') << SOBGame->getCoins();
     
    7474            this->setCaption(s);
    7575           
    76           }
    77            if (this->type_ == "Points") {
     76        }
     77        if (this->type_ == "Points") {
    7878            std::stringstream ss;
    7979            ss << std::setw(6) << std::setfill('0') << SOBGame->getPoints();
    8080            std::string s = ss.str();
    8181            this->setCaption(s);
    82           }
    83           if (this->type_ == "Time") {
     82        }
     83        if (this->type_ == "Time") {
    8484            std::stringstream ss;
    8585            ss << SOBGame->getTimeLeft();
    8686            std::string s = ss.str();
    8787            this->setCaption(s);
    88           }
    89                
     88        }
     89        if (this->type_ == "Info") {
     90            std::stringstream ss;
     91            ss << SOBGame->getInfoText();
     92            std::string s = ss.str();
     93            this->setCaption(s);
     94        }
     95       
    9096
    91 
    92             //     const std::string& Level = multi_cast<std::string>(this->SOBGame->getLevel());
    93             //     if (this->SOBGame->lives <= 0)
    94             //     {
    95             //         setPosition(Vector2(0.1, 0.65));
    96             //         this->setCaption("Game ends in 30 seconds.\nPress (e)xit / (q)uit to go to the main menu.\nTo restart fly out of the screen!");
    97             //         setTextSize(0.05);
    98             //         this->SOBGame->bEndGame = true;
    99             //     }
    100             //     else if (this->SOBGame->bShowLevel)
    101             //     {
    102             //         setTextSize(0.1);
    103             //         setPosition(Vector2(0.3, 0.55));
    104             //         std::stringstream sstm;
    105             //         sstm << "Level " << Level;
    106             //         this->setCaption(sstm.str()); // + level
    107             //     }
    108             //     else
    109             //     {
    110             //         setTextSize(0.04);
    111             //         setPosition(Vector2(0.14, 0.055));
    112             //         this->setCaption(Level);
    113             //     }
    114             // ////////////
    115             //     const std::string& points = multi_cast<std::string>(this->SOBGame->getPoints());
    116             //     if (this->SOBGame->lives <= 0)
    117             //     {
    118             //         setTextSize(0.2);
    119             //         setPosition(Vector2(0.1, 0.25));
    120             //         this->setCaption("Final score:\n" + points);
    121             //         this->setColour(ColourValue(1, 0, 0, 1));
    122             //     }
    123             //     else
    124             //     {
    125             //         setTextSize(0.04);
    126             //         setPosition(Vector2(0.14, 0.1));
    127             //         this->setColour(ColourValue(1, 1, 1, 1));
    128             //         this->setCaption(points);
    129             //     }
    130            
    131             // /////////////
    132             //     int mult = this->SOBGame->getMultiplier();
    133             //     const std::string& Multiplier = "X " + multi_cast<std::string>(mult);
    134             //     this->setCaption(Multiplier);
    135             //     this->setColour(ColourValue(1, 0, 0, clamp(float(mult * 0.1), 0.0f, 1.0f)));
    136             //     this->setTextSize(clamp(float(mult * 0.1), 0.0f, 1.0f) * 0.01f + 0.04f);
    137            
    138         }
    139     }
    140 
    141     void SOBHUDInfo::changedOwner()
    142     {
    143         SUPER(SOBHUDInfo, changedOwner);
    144 
    145         if (this->getOwner() && this->getOwner()->getGametype())
    146         {
    147             this->SOBGame = orxonox_cast<SOB*>(this->getOwner()->getGametype());
    148         }
    149         else
    150         {
    151             this->SOBGame = nullptr;
    152         }
     97       
    15398    }
    15499}
     100
     101void SOBHUDInfo::changedOwner()
     102{
     103    SUPER(SOBHUDInfo, changedOwner);
     104
     105    if (this->getOwner() && this->getOwner()->getGametype())
     106    {
     107        this->SOBGame = orxonox_cast<SOB*>(this->getOwner()->getGametype());
     108    }
     109    else
     110    {
     111        this->SOBGame = nullptr;
     112    }
     113}
     114}
Note: See TracChangeset for help on using the changeset viewer.