Changeset 6441 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 8, 2006, 4:02:30 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/player.cc
r6440 r6441 38 38 39 39 this->controllable = NULL; 40 this->hud = new Hud();40 this->hud.show(); 41 41 42 42 EventHandler::getInstance()->subscribe(this, ES_GAME, SDLK_l); … … 49 49 Player::~Player () 50 50 { 51 delete this->hud;52 51 53 52 } … … 59 58 { 60 59 this->controllable = controllable; 61 this->hud ->setEnergyWidget(this->controllable->getEnergyWidget());60 this->hud.setEnergyWidget(this->controllable->getEnergyWidget()); 62 61 return true; 63 62 } … … 73 72 { 74 73 this->controllable = NULL; 75 this->hud ->setEnergyWidget(NULL);74 this->hud.setEnergyWidget(NULL); 76 75 return true; 77 76 } -
trunk/src/world_entities/player.h
r6440 r6441 9 9 #include "event_listener.h" 10 10 11 #include "util/hud.h" 12 11 13 /* Forward Declaration */ 12 14 class Playable; 13 class Hud; 15 14 16 15 17 //! Basic controllable WorldEntity … … 36 38 private: 37 39 Playable* controllable; //!< The one we controll or NULL if none 38 Hud * hud; //!< The HUD to be displayed.40 Hud hud; //!< The HUD to be displayed for this Player. 39 41 }; 40 42
Note: See TracChangeset
for help on using the changeset viewer.