Rev | Line | |
---|
[12251] | 1 | #include "OrxoBloxStones.h" |
---|
[12307] | 2 | |
---|
[12251] | 3 | #include "core/CoreIncludes.h" |
---|
| 4 | #include "core/XMLPort.h" |
---|
| 5 | |
---|
| 6 | #include "OrxoBlox.h" |
---|
| 7 | |
---|
| 8 | namespace orxonox |
---|
| 9 | { |
---|
| 10 | RegisterClass(OrxoBloxStones); |
---|
| 11 | /** |
---|
| 12 | @brief |
---|
| 13 | Constructor. Registers and initializes the object. |
---|
| 14 | */ |
---|
[12393] | 15 | OrxoBloxStones::OrxoBloxStones(Context* context) : Pawn(context) |
---|
[12251] | 16 | { |
---|
| 17 | RegisterObject(OrxoBloxStones); |
---|
| 18 | |
---|
[12342] | 19 | this->size_ = 9.0f; |
---|
[12394] | 20 | this->health_ = 1; |
---|
[12251] | 21 | this->delay_ = false; |
---|
| 22 | } |
---|
[12356] | 23 | |
---|
| 24 | unsigned int OrxoBloxStones::getHealth() { |
---|
| 25 | return this->health_; |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | void OrxoBloxStones::reduceHealth() { |
---|
| 29 | this->health_ -= 1; |
---|
| 30 | } |
---|
[12360] | 31 | |
---|
| 32 | float OrxoBloxStones::getSize() { |
---|
| 33 | return this->size_; |
---|
| 34 | } |
---|
[12394] | 35 | |
---|
| 36 | bool OrxoBloxStones::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) |
---|
| 37 | { |
---|
| 38 | orxout() << "a stone should die" << endl; |
---|
| 39 | this->destroy(); |
---|
| 40 | return true; |
---|
| 41 | } |
---|
[12251] | 42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.