Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 30, 2007, 9:17:21 PM (17 years ago)
Author:
patrick
Message:

merged playability back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/light_blaster.cc

    r10471 r10516  
    1010
    1111#include "loading/fast_factory.h"
     12
     13#include "elements/glgui_energywidgetvertical.h"
    1214
    1315CREATE_FACTORY(LightBlaster);
     
    4345   delete [] this->shootAnim;
    4446   delete [] this->objComp;
    45 /*
    46     for(int j = 0; j < this->getSegs(); j++)
    47     {
    48       delete this->shootAnim[i][j];
    49       delete this->objComp[i][j];
    50     }
    51     delete this->shootAnim[i];
    52     delete this->objComp[i];
    53     delete this->emissionPoint[i];
    54   }*/
    5547
    56 //  this->deconstr();
    57       // model will be deleted from WorldEntity-destructor
    5848}
    5949
     
    7969
    8070  this->setActionSound(WA_SHOOT, "sounds/guns/laser.wav");
    81   this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav");
     71//   this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav");
    8272  this->setActionSound(WA_RELOAD, "sounds/spawn/alien_generator.wav");
    8373
    8474  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    85   //this->setProjectileTypeC("RailProjectile");   // FIXME temp project type until the blaste class exist
    86   this->setProjectileTypeC("LBolt");   // Working; FIXME: add textures
    87 //   this->setProjectileTypeC("Spike");   // Working; FIXME: add textures
     75  this->setProjectileTypeC("LBolt");
    8876  this->prepareProjectiles(100);
    8977
     
    137125}
    138126
    139 
    140127void LightBlaster::fire()
    141128{
     
    187174    static_cast<StaticModel*>(this->getModel())->draw();
    188175  glPopMatrix();
     176
    189177}
     178
     179void LightBlaster::tick(float dt)
     180{
     181  if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized)
     182  {
     183    this->energyWidget->setDisplayedImage("textures/gui/gui_light_bolt.png");
     184    this->setEnergyWidgetInitialized(true);
     185  }
     186}
Note: See TracChangeset for help on using the changeset viewer.