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 | { |
---|
[9869] | 29 | ObjectListDeclaration(RepairStation); |
---|
[8927] | 30 | public: |
---|
| 31 | RepairStation (); |
---|
| 32 | RepairStation(const TiXmlElement* root); |
---|
| 33 | virtual ~RepairStation (); |
---|
| 34 | |
---|
| 35 | virtual void loadParams(const TiXmlElement* root); |
---|
| 36 | |
---|
| 37 | void setScale(float scale) { this->scale = scale; } |
---|
| 38 | |
---|
[8941] | 39 | void activate(); |
---|
| 40 | void deactivate(); |
---|
| 41 | void toggleRotation(); |
---|
| 42 | |
---|
[8927] | 43 | virtual void tick (float time); |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | private: |
---|
| 47 | void setAnimation(int animNum, int playbackMode = 0); |
---|
[8943] | 48 | int getAnimation(); |
---|
[8945] | 49 | bool isAnimationFinished(); |
---|
[8927] | 50 | |
---|
| 51 | |
---|
| 52 | private: |
---|
| 53 | float scale; //!< the scale of the model |
---|
| 54 | |
---|
[8931] | 55 | static sAnim animationList[8]; //!< list of the animations |
---|
[8927] | 56 | |
---|
[8941] | 57 | int animationCurrent; //!< number of the current animation |
---|
| 58 | int animationStep; //!< the incrementation step of the animation |
---|
[8927] | 59 | |
---|
[8945] | 60 | bool bActivated; //!< true if activated |
---|
| 61 | |
---|
[8927] | 62 | }; |
---|
| 63 | |
---|
| 64 | #endif /* _REPAIR_STATION_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.