Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2019, 3:09:55 PM (5 years ago)
Author:
ahuwyler
Message:

last commit

Location:
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
Files:
3 edited

Legend:

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

    r12396 r12402  
    143143    void OrxoBlox::LevelUp(){
    144144        level_++;
     145        if((level_%10)==0){
     146            --counter;
     147        }
    145148        int z_ = 0;
    146149
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.cc

    r12394 r12402  
    1818
    1919        this->size_ = 9.0f;
    20         this->health_ = 1;
     20        this->setHealth(1);
    2121        this->delay_ = false;
    2222    }
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.h

    r12394 r12402  
    4040            float getSize(void) const
    4141                { return this->size_; }
    42             /**
    43             @brief Set the Health of the stone.
    44             @param size The dimensions a stone has in the game world. (A stone is a cube)
    45             */
    46             void setHealth(unsigned int health)
    47                 {
    48                     this->health_ = health;
     42           
     43            void gotHit(){
     44                orxout()<<"GOT HIT"<<endl;
     45                unsigned int health_ =this->getHealth();
     46                if (health_> 0){
     47                    this->setHealth(++health_);
     48                    }
     49                else {
     50                    this->kill();
    4951                }
    50             /**
    51             @brief Get the size of the stone.
    52             @return Returns the dimensions a stone has in the game world. (A stone is a cube)
    53             */
    54             unsigned int getHealth(void) const
    55                 { return this->health_; }
    56 
    57             void gotHit(){
    58                 if (this->health_ > 0){
    59                     this->health_ -= this->health_;
    60                     }
    61                 //  else ~OrxoBloxStones();
    6252                }
    6353
     
    7464        private:
    7565            float size_; //!< The dimensions a stone has in the game world.
    76             unsigned int health_;
    7766            bool delay_;
    7867           
Note: See TracChangeset for help on using the changeset viewer.