Rev | Line | |
---|
[2227] | 1 | #ifndef _Turbo_H__ |
---|
| 2 | #define _Turbo_H__ |
---|
| 3 | |
---|
[2202] | 4 | #include "tools/Timer.h" |
---|
[2227] | 5 | #include "Item.h" |
---|
| 6 | #include "OrxonoxPrereqs.h" |
---|
[2202] | 7 | |
---|
| 8 | namespace orxonox |
---|
| 9 | { |
---|
[2227] | 10 | class _OrxonoxExport Turbo : public Item |
---|
[2202] | 11 | { |
---|
| 12 | |
---|
| 13 | public: |
---|
[2227] | 14 | Turbo(BaseObject* creator); |
---|
| 15 | virtual ~Turbo(); |
---|
| 16 | |
---|
| 17 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); |
---|
| 18 | |
---|
| 19 | virtual bool pickedUp(Pawn* player); |
---|
| 20 | virtual bool dropped(Pawn* player); //erst bei festen Items |
---|
| 21 | |
---|
| 22 | void setSpeedBoost(SpaceShip* ship); |
---|
| 23 | void unsetSpeedBoost(SpaceShip* ship); |
---|
| 24 | |
---|
| 25 | inline void setBoost(float boost) |
---|
| 26 | { this->boost_ = boost; } |
---|
| 27 | inline float getBoost() const |
---|
| 28 | { return this->boost_; } |
---|
| 29 | |
---|
| 30 | inline void setDuration(float duration) |
---|
| 31 | { this->duration_ = duration; } |
---|
| 32 | inline float getDuration() const |
---|
| 33 | { return this->duration_; } |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | inline void setAccBoost(float accboost) |
---|
| 37 | { this->accboost_ = accboost; } |
---|
| 38 | inline float getAccBoost() const |
---|
| 39 | { return this->accboost_; } |
---|
| 40 | |
---|
[2202] | 41 | private: |
---|
| 42 | Timer<Turbo> turbotimer_; |
---|
[2227] | 43 | float boost_; |
---|
| 44 | float duration_; |
---|
| 45 | float accboost_; |
---|
| 46 | }; |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | #endif /* _Turbo_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.