- Timestamp:
- Dec 2, 2005, 3:33:46 PM (19 years ago)
- Location:
- branches/spaceshipcontrol/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/Makefile.am
r5766 r5875 47 47 world_entities/world_entity.cc \ 48 48 world_entities/camera.cc \ 49 world_entities/playable.cc \ 49 50 world_entities/player.cc \ 50 51 world_entities/npcs/npc.cc \ … … 87 88 world_entities/world_entity.h \ 88 89 world_entities/camera.h \ 90 world_entities/playable.h \ 89 91 world_entities/player.h \ 90 92 world_entities/npcs/npc.h \ -
branches/spaceshipcontrol/src/lib/util/list.h
r5403 r5875 4 4 */ 5 5 6 #ifndef _ LIST_H7 #define _ LIST_H6 #ifndef _T_LIST_H 7 #define _T_LIST_H 8 8 9 9 #include "compiler.h" … … 645 645 } 646 646 647 #endif /* _ LIST_H */647 #endif /* _T_LIST_H */ -
branches/spaceshipcontrol/src/world_entities/playable.cc
r5872 r5875 14 14 */ 15 15 16 #include "weapon _manager.h"16 #include "weapons/weapon_manager.h" 17 17 #include "playable.h" 18 #include "event_handler.h" 19 #include "player.h" 18 20 19 21 … … 23 25 } 24 26 25 Playable::init() 27 Playable::~Playable() 28 { 29 30 } 31 32 void Playable::init() 26 33 { 27 34 this->setClassID(CL_PLAYABLE, "Playable"); … … 36 43 { 37 44 /*EventHandler*/ 38 evh = EventHandler::getInstance();45 EventHandler* evh = EventHandler::getInstance(); 39 46 for (int i = 0 ; i < events.size(); i++) 40 47 { 41 if (!evh->isSubscribed(ES_GAME, i))42 evh->subscribe(this, ES_GAME, i);43 }48 if (!evh->isSubscribed(ES_GAME, i)) 49 evh->subscribe(player, ES_GAME, i); 50 } 44 51 45 52 } 46 47 Playable::getWeaponManager()48 {49 return weaponMan;50 } -
branches/spaceshipcontrol/src/world_entities/playable.h
r5872 r5875 21 21 class Playable : public WorldEntity 22 22 { 23 24 23 public: 25 24 Playable(); … … 29 28 void loadParams(const TiXmlElement* root); 30 29 31 virtual void addWeapon(Weapon* weapon ) = 0;32 virtual void removeWeapon(Weapon* weapon) = 0;33 WeaponManager* getWeaponManager();30 virtual void addWeapon(Weapon* weapon ) {}//= 0; 31 virtual void removeWeapon(Weapon* weapon) {}//= 0; 32 inline WeaponManager* getWeaponManager() const { return this->weaponMan; }; 34 33 35 34 void subscribeEvents(Player* player); 36 virtual void process(const Event &event) = 0;37 virtual void setKeySet() ;35 virtual void process(const Event &event) {} //= 0; 36 virtual void setKeySet() {}; 38 37 inline const std::list<Event*>& getEventList() { return this->events; }; 39 38 -
branches/spaceshipcontrol/src/world_entities/player.cc
r5872 r5875 16 16 #include "player.h" 17 17 18 #include "factory.h"19 20 #include "list.h"21 22 18 #include "event_handler.h" 23 24 19 #include "event.h" 25 20
Note: See TracChangeset
for help on using the changeset viewer.