Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10760 in orxonox.OLD for branches/presentation/src/world_entities


Ignore:
Timestamp:
Jun 21, 2007, 2:29:46 AM (18 years ago)
Author:
nicolasc
Message:

Widget Improvements

Location:
branches/presentation/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/projectiles/hbolt.cc

    r10758 r10760  
    182182//     float matrix[4][4];
    183183    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     184    glPushAttrib(GL_ENABLE_BIT);
     185    glEnable( GL_ALPHA_TEST);
     186    glAlphaFunc( GL_GEQUAL, .5);
    184187    this->halo->draw();
     188    glPopAttrib();
    185189
    186190    Vector tmpRot = this->getAbsDir().getSpacialAxis();
  • branches/presentation/src/world_entities/space_ships/space_ship.cc

    r10758 r10760  
    305305
    306306
    307   dynamic_cast<WorldEntity*>(this)->createHealthWidget();
    308   dynamic_cast<WorldEntity*>(this)->createShieldWidget();
    309   dynamic_cast<WorldEntity*>(this)->createElectronicWidget();
     307  this->createHealthWidget();
     308  this->createShieldWidget();
     309  this->createElectronicWidget();
    310310
    311311  if ( this->hasPlayer() ){
     
    428428void SpaceShip::tick (float time)
    429429{
    430  
    431   printf("Ship Status: %f, %f\n", this->getHealth(), this->getShield());
    432  
     430
    433431  if(caminit)
    434432  {
     
    10841082void SpaceShip::hit( float damage, WorldEntity * killer )
    10851083{
    1086   printf("SS HIT: %f, %f \n", this->getHealth() , this->getShield());
     1084  PRINTF(4)("SS HIT: %f, %f \n", this->getHealth(), this->getShield());
    10871085  Playable::hit( damage, killer );
    1088   PRINTF(4)("SS HIT: %f\n", this->getHealth());
     1086  PRINTF(4)("SS HIT: %f, %f \n", this->getHealth(), this->getShield());
    10891087}
    10901088
  • branches/presentation/src/world_entities/world_entity.cc

    r10758 r10760  
    272272    {
    273273      PRINTF(4)("fetching OBJ file: %s\n", fileName.c_str());
    274       // creating the model and loading it
     274      // creating the model and loading it  OrxGui::GLGuiEnergyWidgetVertical* implantWidget;
    275275      StaticModel* model = new StaticModel();
    276276      *model = ResourceOBJ(fileName, this->scaling);
     
    831831    float retShield = this->shieldMax - this->shield;
    832832    this->shield = this->shieldMax;
    833 //     this->updateShieldWidget();
     833    this->updateShieldWidget();
    834834    return retShield;
    835835  }
    836 //   this->updateShieldWidget();
     836  this->updateShieldWidget();
    837837  return 0.0;
    838838}
     
    849849  {
    850850    float retShield = -this->shield;
    851 //     this->updateShieldWidget();
     851    this->updateShieldWidget();
    852852    this->bShieldActive = false;
    853853    return retShield;
    854854  }
    855 //   this->updateShieldWidget();
     855  this->updateShieldWidget();
    856856  return 0.0;
    857857}
     
    944944OrxGui::GLGuiWidget* WorldEntity::getImplantWidget()
    945945{
    946   this->createImplantWidget();
     946  if(this->implantWidget == NULL)
     947    this->createImplantWidget();
    947948  return this->implantWidget;
    948949}
     
    10831084    this->shieldWidget = new OrxGui::GLGuiEnergyWidgetVertical();
    10841085    this->shieldWidget->getBarWidget()->setChangedValueColor(Color(1,0,0,1));
    1085     //this->shieldWidget->setDisplayedName("Shield:");
    1086     //his->shieldWidget->setSize2D(100,20);
    1087     //this->shieldWidget->setAbsCoor2D(200,200);
     1086//     this->shieldWidget->setDisplayedName("Shield:");
     1087//     his->shieldWidget->setSize2D(100,20);
     1088//     this->shieldWidget->setAbsCoor2D(200,200);
    10881089    this->updateShieldWidget();
    10891090//     if (dynamic_cast<SpaceShip*>(this)->hasPlayer())
  • branches/presentation/src/world_entities/world_entity.h

    r10737 r10760  
    272272  float                   healthRegen;            //!< Regeneration Rate of Health, mesured in units per second
    273273  OrxGui::GLGuiEnergyWidgetVertical* healthWidget;    //!< The Slider (if wanted).
     274
    274275  OrxGui::GLGuiEnergyWidgetVertical* implantWidget;
    275276
Note: See TracChangeset for help on using the changeset viewer.