Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

new commit

Location:
code/branches/OrxoKart_HS18/src/modules/orxokart
Files:
2 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       
  • code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartFlag.cc

    r12108 r12156  
    8686    void OrxoKartFlag::init(int n, int s)
    8787    {
    88         /*model_ = new Model(this->getContext());
    89         model_->setMeshSource("OrxoKartStreckenabschnitt.mesh");
    90         model_->setScale3D(Vector3(s*n*2, 1, s*n*2));
    91         model_->setPosition(Vector3(s*n*0.5f,-60.0f, s*n*0.5f));
     88        model_ = new Model(this->getContext());
     89        model_->setMeshSource("OrxoKartMushroom.mesh");
     90        model_->setScale3D(Vector3(s, s, s));
     91        model_->setPosition(Vector3(s*n*0.5f,-0.0f, s*n*0.5f));
    9292
    93         this->attach(model_);*/
     93        this->attach(model_);
    9494
    9595        cs_ = new BoxCollisionShape(this->getContext());
     
    9898
    9999        this->attachCollisionShape(cs_);
     100
     101
    100102    }
    101103
Note: See TracChangeset for help on using the changeset viewer.