Last change
on this file since 6133 was
5985,
checked in by manuel, 19 years ago
|
merge: factory has now create from class name string function (svn merge -r 5955:HEAD ../trunk/ powerups/)
|
File size:
955 bytes
|
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 | #include "extendable.h" |
---|
11 | |
---|
12 | /* Forward Declaration */ |
---|
13 | class Playable; |
---|
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 | |
---|
22 | class Player : public EventListener |
---|
23 | { |
---|
24 | |
---|
25 | public: |
---|
26 | Player(); |
---|
27 | virtual ~Player(); |
---|
28 | |
---|
29 | bool setControllable(Playable* controllalble); |
---|
30 | inline Playable* getControllable() { return this->controllable; }; |
---|
31 | |
---|
32 | bool disconnectControllable(); |
---|
33 | |
---|
34 | // eventListener extension. |
---|
35 | virtual void process(const Event &event); |
---|
36 | |
---|
37 | private: |
---|
38 | void init(); |
---|
39 | |
---|
40 | |
---|
41 | private: |
---|
42 | Playable* controllable; //!< The one we controll or NULL if none |
---|
43 | }; |
---|
44 | |
---|
45 | #endif /* _PLAYER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.