Rev | Line | |
---|
[8927] | 1 | #ifndef _REPAIR_STATION_H |
---|
| 2 | #define _REPAIR_STATION_H |
---|
| 3 | |
---|
| 4 | #include "world_entity.h" |
---|
| 5 | |
---|
| 6 | #include "md2/md2Model.h" |
---|
| 7 | |
---|
| 8 | class TiXmlElement; |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | //! animation names enumeration |
---|
| 12 | typedef enum RepairStationAnimType |
---|
| 13 | { |
---|
[8931] | 14 | REPAIR_CYCLE01 = 0, |
---|
| 15 | REPAIR_CYCLE02, |
---|
| 16 | REPAIR_CYCLE03, |
---|
| 17 | REPAIR_CYCLE04, |
---|
| 18 | REPAIR_CYCLE05, |
---|
| 19 | REPAIR_CYCLE06, |
---|
| 20 | REPAIR_CYCLE07, |
---|
| 21 | REPAIR_CYCLE08, |
---|
[8927] | 22 | |
---|
[8941] | 23 | REPAIR_MAX_ANIMATIONS |
---|
[8927] | 24 | }; |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | class RepairStation : public WorldEntity |
---|
| 28 | { |
---|
| 29 | public: |
---|
| 30 | RepairStation (); |
---|
| 31 | RepairStation(const TiXmlElement* root); |
---|
| 32 | virtual ~RepairStation (); |
---|
| 33 | |
---|
| 34 | virtual void loadParams(const TiXmlElement* root); |
---|
| 35 | |
---|
| 36 | void setScale(float scale) { this->scale = scale; } |
---|
| 37 | |
---|
[8941] | 38 | void activate(); |
---|
| 39 | void deactivate(); |
---|
| 40 | void toggleRotation(); |
---|
| 41 | |
---|
[8927] | 42 | virtual void tick (float time); |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | private: |
---|
| 46 | void setAnimation(int animNum, int playbackMode = 0); |
---|
[8943] | 47 | int getAnimation(); |
---|
[8945] | 48 | bool isAnimationFinished(); |
---|
[8927] | 49 | |
---|
| 50 | |
---|
| 51 | private: |
---|
| 52 | float scale; //!< the scale of the model |
---|
| 53 | |
---|
[8931] | 54 | static sAnim animationList[8]; //!< list of the animations |
---|
[8927] | 55 | |
---|
[8941] | 56 | int animationCurrent; //!< number of the current animation |
---|
| 57 | int animationStep; //!< the incrementation step of the animation |
---|
[8927] | 58 | |
---|
[8945] | 59 | bool bActivated; //!< true if activated |
---|
| 60 | |
---|
[8927] | 61 | }; |
---|
| 62 | |
---|
| 63 | #endif /* _REPAIR_STATION_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.