Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/terrain/src/world_entities/npcs/repair_station.h @ 10772

Last change on this file since 10772 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.3 KB
Line 
1#ifndef _REPAIR_STATION_H
2#define _REPAIR_STATION_H
3
4#include "world_entity.h"
5
6#include "md2/md2Model.h"
7
8class TiXmlElement;
9
10
11//! animation names enumeration
12typedef enum RepairStationAnimType
13{
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,
22
23  REPAIR_MAX_ANIMATIONS
24};
25
26
27class RepairStation : public WorldEntity
28{
29  ObjectListDeclaration(RepairStation);
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
39    void activate();
40    void deactivate();
41    void toggleRotation();
42
43    virtual void tick (float time);
44
45
46  private:
47    void setAnimation(int animNum, int playbackMode = 0);
48    int getAnimation();
49    bool isAnimationFinished();
50
51
52  private:
53    float          scale;             //!< the scale of the model
54
55    static sAnim   animationList[8];  //!< list of the animations
56
57    int            animationCurrent;  //!< number of the current animation
58    int            animationStep;     //!< the incrementation step of the animation
59
60    bool           bActivated;        //!< true if activated
61
62};
63
64#endif /* _REPAIR_STATION_H */
Note: See TracBrowser for help on using the repository browser.