Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6440 in orxonox.OLD for trunk/src/world_entities/player.cc


Ignore:
Timestamp:
Jan 8, 2006, 3:20:00 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: now the Widgets are only rendered within the HUD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/player.cc

    r6438 r6440  
    3232Player::Player()
    3333{
    34   this->init();
     34//  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
     35  this->setClassID(CL_PLAYER, "Player");
     36
     37  PRINTF(4)("PLAYER INIT\n");
     38
     39  this->controllable = NULL;
     40  this->hud = new Hud();
    3541
    3642  EventHandler::getInstance()->subscribe(this, ES_GAME, SDLK_l);
     
    4349Player::~Player ()
    4450{
    45 }
     51  delete this->hud;
    4652
    47 
    48 /**
    49  * initializes a Player
    50  */
    51 void Player::init()
    52 {
    53 //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
    54   this->setClassID(CL_PLAYER, "Player");
    55 
    56   PRINTF(4)("PLAYER INIT\n");
    57 
    58   this->controllable = NULL;
    59   this->hud = new Hud();
    6053}
    6154
     
    6659  {
    6760      this->controllable = controllable;
     61      this->hud->setEnergyWidget(this->controllable->getEnergyWidget());
    6862      return true;
    6963  }
     
    7973   {
    8074     this->controllable = NULL;
     75     this->hud->setEnergyWidget(NULL);
    8176     return true;
    8277   }
Note: See TracChangeset for help on using the changeset viewer.