Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/objects/pickup/Turbo.h @ 2958

Last change on this file since 2958 was 2662, checked in by rgrieder, 16 years ago

Merged presentation branch back to trunk.

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