- Timestamp:
- May 20, 2019, 3:09:55 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.