| Last change
                  on this file since 8392 was
                  8228,
                  checked in by patrick, 19 years ago | 
        
          | 
trunk: merged the network branche back to trunk with command: svn merge branches/network trunk -r8150:HEAD
 | 
        | File size:
            1.1 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 | { | 
|---|
| [8228] | 13 |  | 
|---|
| [8067] | 14 | public: | 
|---|
| [8228] | 15 | Spectator(const TiXmlElement* root = NULL); | 
|---|
| [8067] | 16 | virtual ~Spectator(); | 
|---|
| [8228] | 17 |  | 
|---|
|  | 18 | virtual void loadParams(const TiXmlElement* root); | 
|---|
|  | 19 |  | 
|---|
| [8067] | 20 | virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f); | 
|---|
|  | 21 |  | 
|---|
|  | 22 | virtual void enter(); | 
|---|
|  | 23 | virtual void leave(); | 
|---|
| [8228] | 24 |  | 
|---|
|  | 25 | virtual void reset(); | 
|---|
|  | 26 |  | 
|---|
| [8067] | 27 | virtual void collidesWith(WorldEntity* entity, const Vector& location); | 
|---|
|  | 28 | virtual void tick(float time); | 
|---|
|  | 29 |  | 
|---|
|  | 30 | virtual void process(const Event &event); | 
|---|
| [8228] | 31 |  | 
|---|
| [8067] | 32 | private: | 
|---|
| [8228] | 33 | void init(); | 
|---|
|  | 34 |  | 
|---|
| [8067] | 35 | bool                  bLeft; | 
|---|
|  | 36 | bool                  bRight; | 
|---|
|  | 37 | bool                  bForward; | 
|---|
|  | 38 | bool                  bBackward; | 
|---|
|  | 39 |  | 
|---|
|  | 40 | float                 xMouse;             //!< mouse moved in x-Direction | 
|---|
|  | 41 | float                 yMouse;             //!< mouse moved in y-Direction | 
|---|
|  | 42 | Quaternion            mouseDir;           //!< the direction where the player wants to fly | 
|---|
|  | 43 |  | 
|---|
| [8147] | 44 | float                 angleX; | 
|---|
|  | 45 | float                 angleY; | 
|---|
| [8228] | 46 |  | 
|---|
| [8067] | 47 | }; | 
|---|
|  | 48 |  | 
|---|
|  | 49 | #endif | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.