Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10675 in orxonox.OLD for branches/vs-enhencements


Ignore:
Timestamp:
Jun 7, 2007, 2:28:59 PM (18 years ago)
Author:
nicolasc
Message:

xfer

Location:
branches/vs-enhencements/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc

    r10674 r10675  
    296296  this->toList(OM_GROUP_00);
    297297
    298 //   if ( this->hasPlayer() ){
    299 //     State::getPlayer()->hud().setShieldWidget(this->getShieldWidget());
    300 //     State::getPlayer()->hud().setEnergyWidget(this->getElectronicWidget());
    301 //   }
     298
     299  dynamic_cast<WorldEntity*>(this)->createHealthWidget();
     300  dynamic_cast<WorldEntity*>(this)->createShieldWidget();
     301  dynamic_cast<WorldEntity*>(this)->createElectronicWidget();
     302
     303  if ( this->hasPlayer() ){
     304    State::getPlayer()->hud().setShieldWidget(this->getShieldWidget());
     305    State::getPlayer()->hud().setEnergyWidget(this->getElectronicWidget());
     306  }
    302307}
    303308
     
    309314void SpaceShip::loadParams(const TiXmlElement* root)
    310315{
     316  if(!root)
     317    return;
     318
    311319  Playable::loadParams(root);
    312320
  • branches/vs-enhencements/src/world_entities/world_entity.h

    r10671 r10675  
    182182  void resetHealth() { this->health = this->healthMax; };
    183183
     184  void createHealthWidget();
     185  void createShieldWidget();
     186  void createElectronicWidget();
    184187
    185188  void regen(float time);
     
    218221  void setHealthWidgetVisibility(bool visibility);
    219222  void setHealthMax(float healthMax);
    220   void createHealthWidget();
    221   void createShieldWidget();
    222   void createElectronicWidget();
     223//   void createHealthWidget();
     224//   void createShieldWidget();
     225//   void createElectronicWidget();
    223226  void setHealthRegen(float regen) { this->healthRegen = regen; };
    224227    //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
Note: See TracChangeset for help on using the changeset viewer.