Last change
on this file since 10659 was
10618,
checked in by bknecht, 18 years ago
|
merged cleanup into trunk (only improvements)
|
File size:
1.3 KB
|
Rev | Line | |
---|
[8067] | 1 | /*! |
---|
| 2 | * @file cpectator.h |
---|
| 3 | * Implements a playable for lazy people |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _SPECTATOR_H |
---|
| 7 | #define _SPECTATOR_H |
---|
| 8 | |
---|
| 9 | #include "playable.h" |
---|
| 10 | |
---|
| 11 | class Spectator : public Playable |
---|
| 12 | { |
---|
[9869] | 13 | ObjectListDeclaration(Spectator); |
---|
[8228] | 14 | |
---|
[8067] | 15 | public: |
---|
[8228] | 16 | Spectator(const TiXmlElement* root = NULL); |
---|
[8067] | 17 | virtual ~Spectator(); |
---|
[8228] | 18 | |
---|
| 19 | virtual void loadParams(const TiXmlElement* root); |
---|
| 20 | |
---|
[8067] | 21 | virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f); |
---|
| 22 | |
---|
| 23 | virtual void enter(); |
---|
| 24 | virtual void leave(); |
---|
[8228] | 25 | |
---|
| 26 | virtual void reset(); |
---|
| 27 | |
---|
[8067] | 28 | virtual void collidesWith(WorldEntity* entity, const Vector& location); |
---|
| 29 | virtual void tick(float time); |
---|
| 30 | |
---|
| 31 | virtual void process(const Event &event); |
---|
[10618] | 32 | |
---|
| 33 | void allowGhost( bool flag ); |
---|
| 34 | |
---|
| 35 | static void enableGhost(); |
---|
[8228] | 36 | |
---|
[8067] | 37 | private: |
---|
[8228] | 38 | void init(); |
---|
| 39 | |
---|
[8067] | 40 | bool bLeft; |
---|
| 41 | bool bRight; |
---|
| 42 | bool bForward; |
---|
| 43 | bool bBackward; |
---|
[9869] | 44 | |
---|
[8067] | 45 | float xMouse; //!< mouse moved in x-Direction |
---|
| 46 | float yMouse; //!< mouse moved in y-Direction |
---|
| 47 | Quaternion mouseDir; //!< the direction where the player wants to fly |
---|
| 48 | |
---|
[8147] | 49 | float angleX; |
---|
| 50 | float angleY; |
---|
[10618] | 51 | |
---|
| 52 | static Spectator* ghost; |
---|
| 53 | static Playable* regularPlayable; |
---|
[8228] | 54 | |
---|
[8067] | 55 | }; |
---|
| 56 | |
---|
| 57 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.