Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11521


Ignore:
Timestamp:
Oct 30, 2017, 4:17:14 PM (6 years ago)
Author:
merholzl
Message:

changes here and there

Location:
code/branches/FlappyOrx_HS17
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw

    r11514 r11521  
    5959      angularDamping = 0
    6060      scale = "<?lua print(10)?>"
    61       collisiondamage = 0
     61      collisiondamage = 100000
    6262      enablecollisiondamage = true
    6363    >
     
    7777      angularDamping = 0
    7878      scale = "<?lua print(10)?>"
    79       collisiondamage = 0
     79      collisiondamage = 100000
    8080      enablecollisiondamage = true
    8181    >
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc

    r11514 r11521  
    6161        this->center_ = nullptr;
    6262        bEndGame = false;
    63         lives = 3;
     63        lives = 1;
    6464        level = 1;
    6565        point = 0;
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc

    r11503 r11521  
    5151        SUPER(FlappyOrxHUDinfo, XMLPort, xmlelement, mode);
    5252
    53         XMLPortParam(FlappyOrxHUDinfo, "showlives",     setShowLives,     getShowLives,     xmlelement, mode).defaultValues(false);
    54         XMLPortParam(FlappyOrxHUDinfo, "showPoints",     setShowPoints,     getShowPoints,     xmlelement, mode).defaultValues(false);
    55         XMLPortParam(FlappyOrxHUDinfo, "showLevel",     setShowLevel,     getShowLevel,     xmlelement, mode).defaultValues(false);
    56         XMLPortParam(FlappyOrxHUDinfo, "showMultiplier",     setShowMultiplier,     getShowMultiplier,     xmlelement, mode).defaultValues(false);
     53        // XMLPortParam(FlappyOrxHUDinfo, "showlives",     setShowLives,     getShowLives,     xmlelement, mode).defaultValues(false);
     54         XMLPortParam(FlappyOrxHUDinfo, "showPoints",     setShowPoints,     getShowPoints,     xmlelement, mode).defaultValues(false);
     55        // XMLPortParam(FlappyOrxHUDinfo, "showLevel",     setShowLevel,     getShowLevel,     xmlelement, mode).defaultValues(false);
     56        // XMLPortParam(FlappyOrxHUDinfo, "showMultiplier",     setShowMultiplier,     getShowMultiplier,     xmlelement, mode).defaultValues(false);
    5757    }
    5858
     
    6363        if (this->FlappyOrxGame)
    6464        {
    65             if (this->bShowLives_)
    66             {
    67                 const std::string& lives = multi_cast<std::string>(this->FlappyOrxGame->getLives());
    68                 this->setCaption(lives);
    69             }
    70             else if(this->bShowLevel_)
    71             {
    72                 const std::string& Level = multi_cast<std::string>(this->FlappyOrxGame->getLevel());
    73                 if (this->FlappyOrxGame->lives <= 0)
    74                 {
    75                     setPosition(Vector2(0.1, 0.65));
    76                     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!");
    77                     setTextSize(0.05);
    78                     this->FlappyOrxGame->bEndGame = true;
    79                 }
    80                 else if (this->FlappyOrxGame->bShowLevel)
    81                 {
    82                     setTextSize(0.1);
    83                     setPosition(Vector2(0.3, 0.55));
    84                     std::stringstream sstm;
    85                     sstm << "Level " << Level;
    86                     this->setCaption(sstm.str()); // + level
    87                 }
    88                 else
    89                 {
    90                     setTextSize(0.04);
    91                     setPosition(Vector2(0.14, 0.055));
    92                     this->setCaption(Level);
    93                 }
    94             }
    95             else if(this->bShowPoints_)
     65            // if (this->bShowLives_)
     66            // {
     67            //     const std::string& lives = multi_cast<std::string>(this->FlappyOrxGame->getLives());
     68            //     this->setCaption(lives);
     69            // }
     70            // else if(this->bShowLevel_)
     71            // {
     72            //     const std::string& Level = multi_cast<std::string>(this->FlappyOrxGame->getLevel());
     73            //     if (this->FlappyOrxGame->lives <= 0)
     74            //     {
     75            //         setPosition(Vector2(0.1, 0.65));
     76            //         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!");
     77            //         setTextSize(0.05);
     78            //         this->FlappyOrxGame->bEndGame = true;
     79            //     }
     80            //     else if (this->FlappyOrxGame->bShowLevel)
     81            //     {
     82            //         setTextSize(0.1);
     83            //         setPosition(Vector2(0.3, 0.55));
     84            //         std::stringstream sstm;
     85            //         sstm << "Level " << Level;
     86            //         this->setCaption(sstm.str()); // + level
     87            //     }
     88            //     else
     89            //     {
     90            //         setTextSize(0.04);
     91            //         setPosition(Vector2(0.14, 0.055));
     92            //         this->setCaption(Level);
     93            //     }
     94            // }
     95            if(this->bShowPoints_)
    9696            {
    9797                const std::string& points = multi_cast<std::string>(this->FlappyOrxGame->getPoints());
     
    111111                }
    112112            }
    113             else if(this->bShowMultiplier_)
    114             {
    115                 int mult = this->FlappyOrxGame->getMultiplier();
    116                 const std::string& Multiplier = "X " + multi_cast<std::string>(mult);
    117                 this->setCaption(Multiplier);
    118                 this->setColour(ColourValue(1, 0, 0, clamp(float(mult * 0.1), 0.0f, 1.0f)));
    119                 this->setTextSize(clamp(float(mult * 0.1), 0.0f, 1.0f) * 0.01f + 0.04f);
    120             }
     113            // else if(this->bShowMultiplier_)
     114            // {
     115            //     int mult = this->FlappyOrxGame->getMultiplier();
     116            //     const std::string& Multiplier = "X " + multi_cast<std::string>(mult);
     117            //     this->setCaption(Multiplier);
     118            //     this->setColour(ColourValue(1, 0, 0, clamp(float(mult * 0.1), 0.0f, 1.0f)));
     119            //     this->setTextSize(clamp(float(mult * 0.1), 0.0f, 1.0f) * 0.01f + 0.04f);
     120            // }
    121121        }
    122122    }
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.h

    r11503 r11521  
    4545
    4646            inline void setShowLives(bool value)
    47                 { this->bShowLives_ = value; }
     47                { this->bShowLives_ = false; }
    4848            inline bool getShowLives() const
    4949                { return this->bShowLives_; }
    5050
    5151            inline void setShowLevel(bool value)
    52                 { this->bShowLevel_ = value; }
     52                { this->bShowLevel_ = false; }
    5353            inline bool getShowLevel() const
    5454                { return this->bShowLevel_; }
     
    6060
    6161            inline void setShowMultiplier(bool value)
    62                 { this->bShowMultiplier_ = value; }
     62                { this->bShowMultiplier_ = false; }
    6363            inline bool getShowMultiplier() const
    6464                { return this->bShowMultiplier_; }
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc

    r11514 r11521  
    5050
    5151        this->UpwardThrust = 1;
    52         this->speed = 1;orxout() << "constr speed set: " << 1 << endl;
     52        this->speed = 1;
    5353        this->gravity = 1;
    5454       
     
    6868        if (this->hasLocalController())
    6969        {
    70            
     70            if(getHealth()<0){
     71                 getGame()->costLife();
     72                 getGame()->end();
     73            }
    7174            Vector3 pos = getPosition();
    7275            velocity.y += gravity;
Note: See TracChangeset for help on using the changeset viewer.