Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/spaceshipcontrol/src/world_entities/playable.h @ 5872

Last change on this file since 5872 was 5872, checked in by snellen, 18 years ago

player.cc and player.h updated ( in ../src/world_entities)

File size: 1016 bytes
Line 
1
2/*!
3 * @file playable.h
4 * Interface for a basic controllable WorldEntity
5 */
6#ifndef _PLAYABLE_H
7#define _PLAYABLE_H
8
9#include "world_entity.h"
10#include "event.h"
11#include <list.h>
12
13class Weapon;
14class WeaponManager;
15class Player;
16
17//! Basic controllable WorldEntity
18/**
19 *
20 */
21class Playable : public WorldEntity
22{
23
24  public:
25    Playable();
26    virtual ~Playable();
27
28    void init();
29    void loadParams(const TiXmlElement* root);
30
31    virtual void addWeapon(Weapon* weapon )= 0;
32    virtual void removeWeapon(Weapon* weapon) = 0;
33    WeaponManager* getWeaponManager();
34
35    void subscribeEvents(Player* player);
36    virtual void process(const Event &event) = 0;
37    virtual void setKeySet();
38    inline const std::list<Event*>& getEventList() { return this->events; };
39
40
41  private:
42
43    WeaponManager*        weaponMan;          //!< the weapon manager: managing a list of weapon to wepaon-slot mapping
44    std::list<Event*>     events;
45    //todo: add a event to id mapping list
46
47
48};
49
50#endif /* _PLAYABLE_H */
Note: See TracBrowser for help on using the repository browser.