Changeset 12402 for code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
- Timestamp:
- May 20, 2019, 3:09:55 PM (6 years ago)
- 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 143 143 void OrxoBlox::LevelUp(){ 144 144 level_++; 145 if((level_%10)==0){ 146 --counter; 147 } 145 148 int z_ = 0; 146 149 -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.cc
r12394 r12402 18 18 19 19 this->size_ = 9.0f; 20 this-> health_ = 1;20 this->setHealth(1); 21 21 this->delay_ = false; 22 22 } -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.h
r12394 r12402 40 40 float getSize(void) const 41 41 { 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(); 49 51 } 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) const55 { return this->health_; }56 57 void gotHit(){58 if (this->health_ > 0){59 this->health_ -= this->health_;60 }61 // else ~OrxoBloxStones();62 52 } 63 53 … … 74 64 private: 75 65 float size_; //!< The dimensions a stone has in the game world. 76 unsigned int health_;77 66 bool delay_; 78 67
Note: See TracChangeset
for help on using the changeset viewer.