Last change
on this file since 12312 was
12307,
checked in by ahuwyler, 6 years ago
|
A Stone is in the game/ Templates are ajusted
|
File size:
1.5 KB
|
Rev | Line | |
---|
[12278] | 1 | #ifndef _OrxoBloxWall_H__ |
---|
| 2 | #define _OrxoBloxWall_H__ |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | #include "worldentities/StaticEntity.h" |
---|
| 6 | #include "tools/Timer.h" |
---|
| 7 | |
---|
| 8 | namespace orxonox |
---|
| 9 | { |
---|
| 10 | |
---|
| 11 | /** |
---|
| 12 | @brief |
---|
| 13 | |
---|
| 14 | @author |
---|
| 15 | |
---|
| 16 | @ingroup OrxoBlox |
---|
| 17 | */ |
---|
| 18 | class _OrxoBloxExport OrxoBloxWall : public StaticEntity |
---|
| 19 | { |
---|
| 20 | public: |
---|
| 21 | OrxoBloxWall(Context* context); //!< Constructor. Registers and initializes the object. |
---|
| 22 | virtual ~OrxoBloxWall() {} |
---|
| 23 | // this.destroy(); |
---|
| 24 | //} |
---|
| 25 | |
---|
| 26 | /** |
---|
| 27 | @brief Set the Health of the stone. |
---|
| 28 | @param size The dimensions a stone has in the game world. (A stone is a cube) |
---|
| 29 | */ |
---|
| 30 | void setHealth(unsigned int health) |
---|
| 31 | { |
---|
| 32 | this->health_ = health; |
---|
| 33 | } |
---|
| 34 | /** |
---|
| 35 | @brief Get the size of the stone. |
---|
| 36 | @return Returns the dimensions a stone has in the game world. (A stone is a cube) |
---|
| 37 | */ |
---|
| 38 | unsigned int getHealth(void) const |
---|
| 39 | { return this->health_; } |
---|
| 40 | |
---|
| 41 | void gotHit(){ |
---|
| 42 | if (this->health_ > 0){ |
---|
| 43 | this->health_ -= this->health_; |
---|
| 44 | } |
---|
| 45 | // else ~OrxoBloxStones(); |
---|
| 46 | } |
---|
[12307] | 47 | void setGame(OrxoBlox* orxoblox) |
---|
| 48 | { assert(orxoblox); orxoblox_ = orxoblox; } |
---|
[12278] | 49 | private: |
---|
[12307] | 50 | OrxoBlox* getOrxoBlox(); |
---|
[12278] | 51 | unsigned int health_; |
---|
| 52 | bool delay_; |
---|
[12307] | 53 | OrxoBlox* orxoblox_; |
---|
[12278] | 54 | |
---|
| 55 | |
---|
| 56 | }; |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | #endif /* _OrxoBloxWall_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.