|
Last change
on this file since 8153 was
8152,
checked in by rennerc, 19 years ago
|
|
replaced Spectator with new implementation
|
|
File size:
2.3 KB
|
| Line | |
|---|
| 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 | #if 0 |
|---|
| 12 | class Spectator : public Playable |
|---|
| 13 | { |
|---|
| 14 | public: |
|---|
| 15 | Spectator( const TiXmlElement* root = NULL ); |
|---|
| 16 | virtual ~Spectator(); |
|---|
| 17 | |
|---|
| 18 | virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f); |
|---|
| 19 | |
|---|
| 20 | virtual void enter(); |
|---|
| 21 | virtual void leave(); |
|---|
| 22 | |
|---|
| 23 | virtual void collidesWith(WorldEntity* entity, const Vector& location); |
|---|
| 24 | virtual void tick(float time); |
|---|
| 25 | |
|---|
| 26 | virtual void process(const Event &event); |
|---|
| 27 | |
|---|
| 28 | private: |
|---|
| 29 | bool bLeft; |
|---|
| 30 | bool bRight; |
|---|
| 31 | bool bForward; |
|---|
| 32 | bool bBackward; |
|---|
| 33 | |
|---|
| 34 | float xMouse; //!< mouse moved in x-Direction |
|---|
| 35 | float yMouse; //!< mouse moved in y-Direction |
|---|
| 36 | Quaternion mouseDir; //!< the direction where the player wants to fly |
|---|
| 37 | |
|---|
| 38 | //Quaternion rotY; |
|---|
| 39 | //Quaternion rotAxis; |
|---|
| 40 | float angleX; |
|---|
| 41 | float angleY; |
|---|
| 42 | }; |
|---|
| 43 | #endif |
|---|
| 44 | |
|---|
| 45 | class Vector; |
|---|
| 46 | class Event; |
|---|
| 47 | class ParticleEmitter; |
|---|
| 48 | class ParticleSystem; |
|---|
| 49 | |
|---|
| 50 | class Spectator : public Playable |
|---|
| 51 | { |
|---|
| 52 | |
|---|
| 53 | public: |
|---|
| 54 | Spectator(const std::string& fileName); |
|---|
| 55 | Spectator(const TiXmlElement* root = NULL); |
|---|
| 56 | virtual ~Spectator(); |
|---|
| 57 | |
|---|
| 58 | virtual void loadParams(const TiXmlElement* root); |
|---|
| 59 | |
|---|
| 60 | virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f); |
|---|
| 61 | |
|---|
| 62 | virtual void enter(); |
|---|
| 63 | virtual void leave(); |
|---|
| 64 | |
|---|
| 65 | virtual void reset(); |
|---|
| 66 | |
|---|
| 67 | virtual void collidesWith(WorldEntity* entity, const Vector& location); |
|---|
| 68 | virtual void tick(float time); |
|---|
| 69 | |
|---|
| 70 | virtual void process(const Event &event); |
|---|
| 71 | |
|---|
| 72 | private: |
|---|
| 73 | void init(); |
|---|
| 74 | |
|---|
| 75 | bool bLeft; |
|---|
| 76 | bool bRight; |
|---|
| 77 | bool bForward; |
|---|
| 78 | bool bBackward; |
|---|
| 79 | |
|---|
| 80 | float xMouse; //!< mouse moved in x-Direction |
|---|
| 81 | float yMouse; //!< mouse moved in y-Direction |
|---|
| 82 | Quaternion mouseDir; //!< the direction where the player wants to fly |
|---|
| 83 | |
|---|
| 84 | //Quaternion rotY; |
|---|
| 85 | //Quaternion rotAxis; |
|---|
| 86 | float angleX; |
|---|
| 87 | float angleY; |
|---|
| 88 | |
|---|
| 89 | }; |
|---|
| 90 | |
|---|
| 91 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.