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