source:
orxonox.OLD/trunk/src/world_entities/player.h
@
10710
Last change on this file since 10710 was 10368, checked in by patrick, 18 years ago | |
---|---|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[10368] | 1 | /*! |
[4885] | 2 | * @file player.h |
[6985] | 3 | * Implements a basic playable WorldEntity |
[4818] | 4 | */ |
[3471] | 5 | |
6 | #ifndef _PLAYER_H | |
7 | #define _PLAYER_H | |
8 | ||
[4404] | 9 | #include "event_listener.h" |
[3471] | 10 | |
[6441] | 11 | #include "util/hud.h" |
12 | ||
[5915] | 13 | /* Forward Declaration */ |
14 | class Playable; | |
[3471] | 15 | |
[6441] | 16 | |
[6985] | 17 | //! Basic playable WorldEntity |
[4885] | 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 | */ | |
[5915] | 23 | class Player : public EventListener |
[3471] | 24 | { |
[9869] | 25 | ObjectListDeclaration(Player); |
[4780] | 26 | |
[4818] | 27 | public: |
28 | Player(); | |
29 | virtual ~Player(); | |
[3583] | 30 | |
[6985] | 31 | bool setPlayable(Playable* controllalble); |
[7339] | 32 | bool eject(); |
[6986] | 33 | inline Playable* getPlayable() const { return this->playable; }; |
[4780] | 34 | |
[9869] | 35 | |
[9019] | 36 | inline Hud& hud() { return this->_hud; }; |
37 | inline const Hud& hud() const { return this->_hud; }; | |
[9002] | 38 | |
39 | ||
[6443] | 40 | void weaponConfigChanged(); |
[9061] | 41 | void enterNewPlayable(); |
[4780] | 42 | |
[5915] | 43 | // eventListener extension. |
44 | virtual void process(const Event &event); | |
[3583] | 45 | |
[4818] | 46 | private: |
[9002] | 47 | Playable* playable; //!< The one we controll or NULL if none |
[10368] | 48 | Hud _hud; //!< The HUD to be displayed for this Player. |
[3471] | 49 | }; |
50 | ||
51 | #endif /* _PLAYER_H */ |
Note: See TracBrowser
for help on using the repository browser.