Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.cc @ 12359

Last change on this file since 12359 was 12356, checked in by pomselj, 5 years ago

Bounces ok-ish, still seg fault… stones get destroyed but models stay, maybe destroy wals too

File size: 702 bytes
Line 
1#include "OrxoBloxStones.h"
2
3#include "core/CoreIncludes.h"
4#include "core/XMLPort.h"
5
6#include "OrxoBlox.h"
7
8namespace orxonox
9{
10    RegisterClass(OrxoBloxStones);
11    /**
12    @brief
13        Constructor. Registers and initializes the object.
14    */
15    OrxoBloxStones::OrxoBloxStones(Context* context) : StaticEntity(context)
16    {
17        RegisterObject(OrxoBloxStones);
18
19        this->size_ = 9.0f;
20        this->health_ = 1 + static_cast<unsigned int>(rnd(6.0f)); //<! random number between 0 and 7;
21        this->delay_ = false;
22    }
23
24    unsigned int OrxoBloxStones::getHealth() {
25        return this->health_;
26    }
27
28    void OrxoBloxStones::reduceHealth() {
29        this->health_ -= 1;
30    }
31}
Note: See TracBrowser for help on using the repository browser.