#ifndef _OrxoBloxStones_H__ #define _OrxoBloxStones_H__ #include "OrxoBlox/OrxoBloxPrereqs.h" #include "worldentities/StaticEntity.h" #include "tools/Timer.h" namespace orxonox { /** @brief @author @ingroup OrxoBlox */ class _OrxoBloxExport OrxoBloxStones : public StaticEntity { public: OrxoBloxStones(Context* context); //!< Constructor. Registers and initializes the object. virtual ~OrxoBloxStones() {} // this.destroy(); //} /** @brief Set the size of the stone. @param size The dimensions a stone has in the game world. (A stone is a cube) */ void setSize(float size) { this->size_ = size; } /** @brief Get the size of the stone. @return Returns the dimensions a stone has in the game world. (A stone is a cube) */ float getSize(void) const { return this->size_; } /** @brief Set the Health of the stone. @param size The dimensions a stone has in the game world. (A stone is a cube) */ void setHealth(unsigned int health) { this->health_ = health; } /** @brief Get the size of the stone. @return Returns the dimensions a stone has in the game world. (A stone is a cube) */ unsigned int getHealth(void) const { return this->health_; } void gotHit(){ if (this->health_ > 0){ this->health_ -= this->health_; } // else ~OrxoBloxStones(); } void setGame(OrxoBlox* orxoblox) { assert(orxoblox); orxoblox_ = orxoblox; } unsigned int getHealth(); void reduceHealth(); float getSize(); private: float size_; //!< The dimensions a stone has in the game world. unsigned int health_; bool delay_; OrxoBlox* orxoblox_; }; } #endif /* _OrxoBloxStones_H__ */