Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/spectator.h @ 10683

Last change on this file since 10683 was 10618, checked in by bknecht, 18 years ago

merged cleanup into trunk (only improvements)

File size: 1.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
11class Spectator : public Playable
12{
13  ObjectListDeclaration(Spectator);
14
15  public:
16    Spectator(const TiXmlElement* root = NULL);
17    virtual ~Spectator();
18
19    virtual void loadParams(const TiXmlElement* root);
20
21    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
22
23    virtual void enter();
24    virtual void leave();
25
26    virtual void reset();
27
28    virtual void collidesWith(WorldEntity* entity, const Vector& location);
29    virtual void tick(float time);
30
31    virtual void process(const Event &event);
32   
33    void allowGhost( bool flag );
34   
35    static void enableGhost();
36
37  private:
38    void init();
39
40    bool                  bLeft;
41    bool                  bRight;
42    bool                  bForward;
43    bool                  bBackward;
44
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
49    float                 angleX;
50    float                 angleY;
51   
52    static Spectator*     ghost;
53    static Playable*      regularPlayable;
54
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.