Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/npcs/gate.h @ 9331

Last change on this file since 9331 was 9298, checked in by bensch, 18 years ago

orxonox/trunk: merged the branche scripting back here.

merged with command:
svn merge -r9239:HEAD https://svn.orxonox.net/orxonox/branches/scripting .
no conflicts

File size: 1.3 KB
RevLine 
[9222]1#ifndef _GATE_H
2#define _GATE_H
3
4#include "world_entity.h"
5
6#include "md2/md2Model.h"
7
8class TiXmlElement;
9
10
11//! animation names enumeration
12typedef enum GateAnimType
13{
14  GATE_OPEN = 0,
15  GATE_CLOSE,
16  GATE_DIE,
17
18  GATE_MAX_ANIMATIONS
19};
20
21
22class Gate : public WorldEntity
23{
24  public:
25    Gate(const TiXmlElement* root = NULL);
26    virtual ~Gate ();
27
28    virtual void loadParams(const TiXmlElement* root);
29
30    void setActionRadius(float radius) { this->actionRadius = radius; }
31    void setScale(float scale) { this->scale = scale; }
32
33    void open();
34    void close();
35    void destroy();
36
37    void lock() { this->bLocked = true; }
38    void unlock() { this->bLocked = false; }
39    bool isLocked() const { return this->bLocked; }
40
41
42    virtual void tick (float time);
43
44
45  private:
46    void init();
47    bool checkOpen();
48    void setAnimation(int animNum, int playbackMode = 0);
49
50
51  private:
[9298]52    bool           destroyed;         //!< true if the door is destroyed
[9222]53    bool           bOpen;             //!< true if the door is open
54    bool           bLocked;           //!< true if this door is locked
55    float          actionRadius;      //!< action radius
56    float          scale;             //!< the scale of the model
57
58    static sAnim   animationList[3];  //!< list of the animations
59
60    bool           bDead;
61
62
63};
64
65#endif /* _GATE_H */
Note: See TracBrowser for help on using the repository browser.