Changeset 7866 in orxonox.OLD for branches/gui/src/world_entities
- Timestamp:
- May 26, 2006, 1:11:10 PM (19 years ago)
- Location:
- branches/gui/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/world_entities/camera.cc
r7347 r7866 31 31 this->target = new CameraTarget(); 32 32 33 EventHandler::getInstance()->subscribe(this,ES_GAME, KeyMapper::PEV_VIEW0);34 EventHandler::getInstance()->subscribe(this,ES_GAME, KeyMapper::PEV_VIEW1);35 EventHandler::getInstance()->subscribe(this,ES_GAME, KeyMapper::PEV_VIEW2);36 EventHandler::getInstance()->subscribe(this,ES_GAME, KeyMapper::PEV_VIEW3);37 EventHandler::getInstance()->subscribe(this,ES_GAME, KeyMapper::PEV_VIEW4);38 EventHandler::getInstance()->subscribe(this,ES_GAME, KeyMapper::PEV_VIEW5);33 this->subscribeEvent(ES_GAME, KeyMapper::PEV_VIEW0); 34 this->subscribeEvent(ES_GAME, KeyMapper::PEV_VIEW1); 35 this->subscribeEvent(ES_GAME, KeyMapper::PEV_VIEW2); 36 this->subscribeEvent(ES_GAME, KeyMapper::PEV_VIEW3); 37 this->subscribeEvent(ES_GAME, KeyMapper::PEV_VIEW4); 38 this->subscribeEvent(ES_GAME, KeyMapper::PEV_VIEW5); 39 39 40 40 this->setFovy(90); -
branches/gui/src/world_entities/playable.cc
r7713 r7866 16 16 17 17 #include "playable.h" 18 #include "event_handler.h" 18 19 #include "key_mapper.h" 19 20 20 21 #include "player.h" … … 225 226 226 227 // unsubscibe all events. 227 EventHandler* evh = EventHandler::getInstance();228 228 std::vector<int>::iterator ev; 229 229 for (ev = this->events.begin(); ev != events.end(); ev++) 230 evh->unsubscribe(ES_GAME, (*ev));230 player->unsubscribeEvent(ES_GAME, (*ev)); 231 231 232 232 // leave the entity … … 251 251 252 252 /*EventHandler*/ 253 EventHandler* evh = EventHandler::getInstance();254 253 std::vector<int>::iterator ev; 255 254 for (ev = this->events.begin(); ev != events.end(); ev++) 256 evh->subscribe(player,ES_GAME, (*ev));255 player->subscribeEvent(ES_GAME, (*ev)); 257 256 258 257 this->enter(); … … 440 439 441 440 if (this->currentPlayer != NULL) 442 EventHandler::getInstance()->subscribe(this->currentPlayer,ES_GAME, eventType);441 this->currentPlayer->subscribeEvent(ES_GAME, eventType); 443 442 } 444 443 … … 453 452 454 453 if (this->currentPlayer != NULL) 455 EventHandler::getInstance()->unsubscribe(ES_GAME, eventType);454 this->currentPlayer->unsubscribeEvent(ES_GAME, eventType); 456 455 } 457 456 -
branches/gui/src/world_entities/player.cc
r7337 r7866 40 40 this->hud.show(); 41 41 42 EventHandler::getInstance()->subscribe(this,ES_GAME, KeyMapper::PEV_CHANGE_SHIP);42 this->subscribeEvent(ES_GAME, KeyMapper::PEV_CHANGE_SHIP); 43 43 } 44 44 -
branches/gui/src/world_entities/weapons/crosshair.cc
r7221 r7866 65 65 this->material = new Material; 66 66 67 // EventHandler::getInstance()->subscribe(this,ES_GAME, EV_MOUSE_MOTION);67 //this->subscribeEvent(ES_GAME, EV_MOUSE_MOTION); 68 68 69 69 // center the mouse on the screen, and also hide the cursors
Note: See TracChangeset
for help on using the changeset viewer.