| Line |   | 
|---|
| 1 | /*! | 
|---|
| 2 |  * @file player.h | 
|---|
| 3 |  * Implements a basic playable WorldEntity | 
|---|
| 4 |  */ | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef _PLAYER_H | 
|---|
| 7 | #define _PLAYER_H | 
|---|
| 8 |  | 
|---|
| 9 | #include "event_listener.h" | 
|---|
| 10 |  | 
|---|
| 11 | #include "util/hud.h" | 
|---|
| 12 |  | 
|---|
| 13 | /* Forward Declaration */ | 
|---|
| 14 | class Playable; | 
|---|
| 15 |  | 
|---|
| 16 |  | 
|---|
| 17 | //! Basic playable WorldEntity | 
|---|
| 18 | /** | 
|---|
| 19 |   *  this is the debug player - actualy we would have to make a new | 
|---|
| 20 |      class derivated from Player for each player. for now, we just use | 
|---|
| 21 |      the player.cc for debug also | 
|---|
| 22 | */ | 
|---|
| 23 | class Player : public EventListener | 
|---|
| 24 | { | 
|---|
| 25 |  | 
|---|
| 26 |   public: | 
|---|
| 27 |     Player(); | 
|---|
| 28 |     virtual ~Player(); | 
|---|
| 29 |  | 
|---|
| 30 |     bool              setPlayable(Playable* controllalble); | 
|---|
| 31 |     bool              eject(); | 
|---|
| 32 |     inline Playable*  getPlayable() const  { return this->playable; }; | 
|---|
| 33 |  | 
|---|
| 34 |     void              weaponConfigChanged(); | 
|---|
| 35 |  | 
|---|
| 36 |     // eventListener extension. | 
|---|
| 37 |     virtual void      process(const Event &event); | 
|---|
| 38 |  | 
|---|
| 39 |   private: | 
|---|
| 40 |     Playable*         playable;                  //!< The one we controll or NULL if none | 
|---|
| 41 |     Hud               hud;                       //!< The HUD to be displayed for this Player. | 
|---|
| 42 | }; | 
|---|
| 43 |  | 
|---|
| 44 | #endif /* _PLAYER_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.