/*! * @file playable.h * Interface for a basic controllable WorldEntity */ #ifndef _PLAYABLE_H #define _PLAYABLE_H #include "world_entity.h" #include "event.h" #include class Weapon; class WeaponManager; //! Basic controllable WorldEntity /** * */ class Playable : public WorldEntity { public: Playable(); virtual ~Playable(); void init(); void loadParams(const TiXmlElement* root); virtual void addWeapon(Weapon* weapon )= 0; virtual void removeWeapon(Weapon* weapon) = 0; virtual void process(const Event &event) = 0; virtual void setKeySet(); inline const std::list& getEventList() { return this->events; }; WeaponManager* getWeaponManager(); private: WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping std::list events; //todo: add a event to id mapping list }; #endif /* _PLAYABLE_H */