Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2018, 12:34:31 PM (5 years ago)
Author:
ottka
Message:

new commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc

    r12155 r12156  
    5151        this->firstTick_ = true;
    5252        this->numberOfShrooms = 3;
     53        this->player = nullptr;
    5354
    5455        this->setHUDTemplate("OrxoKartHUD");
     
    105106                            0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,1,1,1,0,1,1,1};
    106107
    107 
    108 
    109108            int *levelcodeArray =  level==1 ? map_1 : map_2;
    110 
    111 
    112 
    113             //OrxoKartTile* tile = new OrxoKartTile(origin_->getContext());
    114             //tile->init(0*s, 4*s, s, 20, 2);
    115 
    116 
    117109            // int z = 0;
    118110            //Generate floor according to levelcode
     
    176168
    177169
     170                orxout() << numberOfShrooms << endl;
    178171
    179172
    180         // Check if ship collided with the flag
     173        // Check if ship collided with the flag, flag is the bottom that is responsible for the game to detect the spaceship falling.
    181174        if(flag_->getCollided()){
     175                orxout() << numberOfShrooms << endl;
    182176            player = flag_->getObjectofCollision();
    183177            if (level == 1)
     
    190184            flag_->setCollided(false);
    191185            wayPointCounter = 0;
     186        }
    192187
     188        if (player && player->isBoosting()) {
     189                orxout() << "Boosting" << endl;
     190                if(!numberOfShrooms) numberOfShrooms--;
    193191        }
    194192       
Note: See TracChangeset for help on using the changeset viewer.