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 | #include "world_entities/space_ships/playership.h" |
---|
13 | |
---|
14 | /* Forward Declaration */ |
---|
15 | class Playable; |
---|
16 | |
---|
17 | |
---|
18 | //! Basic playable WorldEntity |
---|
19 | /** |
---|
20 | * this is the debug player - actualy we would have to make a new |
---|
21 | class derivated from Player for each player. for now, we just use |
---|
22 | the player.cc for debug also |
---|
23 | */ |
---|
24 | class Player : public EventListener |
---|
25 | { |
---|
26 | ObjectListDeclaration(Player); |
---|
27 | |
---|
28 | public: |
---|
29 | Player(); |
---|
30 | virtual ~Player(); |
---|
31 | |
---|
32 | bool setPlayable(Playable* controllalble); |
---|
33 | bool eject(); |
---|
34 | void setPlayerShip(PlayerShip playership); |
---|
35 | PlayerShip* getPlayerShip(); |
---|
36 | inline Playable* getPlayable() const { return this->playable; }; |
---|
37 | |
---|
38 | |
---|
39 | inline Hud& hud() { return this->_hud; }; |
---|
40 | inline const Hud& hud() const { return this->_hud; }; |
---|
41 | |
---|
42 | |
---|
43 | void weaponConfigChanged(); |
---|
44 | void enterNewPlayable(); |
---|
45 | |
---|
46 | // eventListener extension. |
---|
47 | virtual void process(const Event &event); |
---|
48 | |
---|
49 | private: |
---|
50 | Playable* playable; //!< The one we controll or NULL if none |
---|
51 | Hud _hud; //!< The HUD to be displayed for this Player. |
---|
52 | PlayerShip playership; |
---|
53 | }; |
---|
54 | |
---|
55 | #endif /* _PLAYER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.