Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10765 was 9003, checked in by bensch, 18 years ago

orxonox/trunk: merged the single_player_map branche back
merged with command:
svn merge -r8896:HEAD https://svn.orxonox.net/orxonox/branches/single_player_map .
no conflicts

File size: 1.2 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  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
38    void activate();
39    void deactivate();
40    void toggleRotation();
41
42    virtual void tick (float time);
43
44
45  private:
46    void setAnimation(int animNum, int playbackMode = 0);
47    int getAnimation();
48    bool isAnimationFinished();
49
50
51  private:
52    float          scale;             //!< the scale of the model
53
54    static sAnim   animationList[8];  //!< list of the animations
55
56    int            animationCurrent;  //!< number of the current animation
57    int            animationStep;     //!< the incrementation step of the animation
58
59    bool           bActivated;        //!< true if activated
60
61};
62
63#endif /* _REPAIR_STATION_H */
Note: See TracBrowser for help on using the repository browser.