- Timestamp:
- Dec 2, 2005, 4:27:53 PM (19 years ago)
- Location:
- branches/spaceshipcontrol/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/playable.cc
r5876 r5877 44 44 /*EventHandler*/ 45 45 EventHandler* evh = EventHandler::getInstance(); 46 std::list< Event*>::iterator ev;46 std::list<int>::iterator ev; 47 47 for (ev = this->events.begin(); ev != events.end(); ev++) 48 48 { 49 if (!evh->isSubscribed(ES_GAME, (*ev)->type)) 50 evh->subscribe(player, ES_GAME, (*ev)->type); 49 evh->subscribe(player, ES_GAME, (*ev)); 51 50 } 52 51 -
branches/spaceshipcontrol/src/world_entities/playable.h
r5876 r5877 35 35 virtual void process(const Event &event) {} //= 0; 36 36 virtual void setKeySet() {}; 37 inline const std::list< Event*>& getEventList() { return this->events; };37 inline const std::list<int>& getEventList() { return this->events; }; 38 38 39 protected: 40 void registerEvent(int eventType); 39 41 40 42 private: 41 43 42 44 WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping 43 std::list< Event*>events;45 std::list<int> events; 44 46 //todo: add a event to id mapping list 45 47
Note: See TracChangeset
for help on using the changeset viewer.