Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12384


Ignore:
Timestamp:
May 16, 2019, 4:03:46 PM (5 years ago)
Author:
pomselj
Message:

OrxoBlox is linked to Projectile, level up works

Location:
code/branches/OrxoBlox_FS19/src/modules
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt

    r12371 r12384  
    77  OrxoBloxScore.cc
    88  OrxoBloxShip.cc
     9  ../weapons/weaponmodes/BallGun.cc
     10  ../weapons/projectiles/BallProjectile.cc
    911
    1012)
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12382 r12384  
    230230        orxout() << "level up called" << endl;
    231231        this->playerScored(this->player_);// add points
    232         for(OrxoBloxStones* stone : this->stones_){
    233             int x_=(stone->getPosition()).x;
    234             int y_=(stone->getPosition()).y;
    235             z_=(stone->getPosition()).z;
    236             //if(z_==90)this->end();
    237 
    238             stone->setPosition(x_,y_,z_+9.0f);
    239            
    240         }
     232       
    241233
    242234
     
    270262        //create balls
    271263        //insert new wall
    272         if( z_ >= 45){
    273             orxout() << "calling end() function" << endl;
    274             this->end();
    275             }
     264        for(OrxoBloxStones* stone : this->stones_){
     265            if (stone != nullptr) {
     266            int x_=(stone->getPosition()).x;
     267            int y_=(stone->getPosition()).y;
     268            z_=(stone->getPosition()).z;
     269            //if(z_==90)this->end();
     270
     271            stone->setPosition(x_,y_,z_+9.0f);
     272            if( z_ >= 45){
     273                orxout() << "calling end() function" << endl;
     274                this->end();
     275            }
     276            }
     277           
     278        }
     279
    276280       
    277281    }
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc

    r12378 r12384  
    3333
    3434#include "BallProjectile.h"
    35 #include "../OrxoBlox/OrxoBlox.h"
    36 #include "../OrxoBlox/OrxoBloxStones.h"
    3735#include "gametypes/Gametype.h"
    3836
     
    6058        this->fieldWidth_ = 46;
    6159        this->fieldHeight_ =  49;
    62         //this->orxoblox_ = this->getOrxoBlox();
     60        this->orxoblox_ = this->getOrxoBlox();
    6361
    6462        //setEffect("Orxonox/sparks2");
     
    149147
    150148
    151     /*
     149   
    152150    OrxoBlox* BallProjectile::getOrxoBlox()
    153151    {
     
    160158        return nullptr;
    161159    }
    162     */
     160   
    163161
    164162
     
    185183                position.z = this-> fieldHeight_;
    186184               
    187                 //orxoblox_->LevelUp();
     185                orxoblox_->LevelUp();
    188186
    189187
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h

    r12378 r12384  
    3737#include "weapons/WeaponsPrereqs.h"
    3838#include "weapons/projectiles/BillboardProjectile.h"
    39 #include "../OrxoBlox/OrxoBlox.h"
     39#include "../../OrxoBlox/OrxoBlox.h"
     40#include "../../OrxoBlox/OrxoBloxStones.h"
    4041
    4142#include "OrxoBlox/OrxoBloxPrereqs.h"
     
    6869            void registerVariables();
    6970            void changeTexture();
    70             //OrxoBlox* getOrxoBlox();
     71            OrxoBlox* getOrxoBlox();
    7172           
    7273            float speed_; //!< The speed (in x-direction) of the ball.
     
    7677            unsigned int maxTextureIndex_; //!< The maximal index.
    7778            std::string materialBase_; //!< The base name of the material.
    78             //OrxoBlox* orxoblox_;
     79            OrxoBlox* orxoblox_;
    7980    };
    8081}
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/CMakeLists.txt

    r12281 r12384  
    1515  MineProjectile.cc
    1616  WagnisProjectile.cc
    17   BallProjectile.cc
     17  #BallProjectile.cc
    1818)
  • code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/CMakeLists.txt

    r12281 r12384  
    1414  MineGun.cc
    1515  WagnisGun.cc
    16   BallGun.cc
     16  #BallGun.cc
    1717)
Note: See TracChangeset for help on using the changeset viewer.