Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4930 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Jul 22, 2005, 2:11:21 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: adapted the Factory algorithm to ObjectManager… still a logn way to go…

Location:
orxonox/trunk/src/world_entities/weapons
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapons/test_gun.cc

    r4927 r4930  
    105105  this->setStateDuration(WS_DEACTIVATING, .4);
    106106
     107  this->setMaximumEnergy(1000, 10);
    107108  this->increaseEnergy(100);
    108109  //this->minCharge = 2;
  • orxonox/trunk/src/world_entities/weapons/weapon.cc

    r4927 r4930  
    8888
    8989  this->energyLoaded = .0;
    90   this->energyLoadedMax = 10.0;
     90  this->energyLoadedMax = 5.0;
    9191  this->energy = .0;
    92   this->energyMax = 100.0;
     92  this->energyMax = 10.0;
    9393}
    9494
     
    112112  if (action >= WA_ACTION_COUNT)
    113113    return;
     114  if (this->soundBuffers[action] != NULL)
     115    ResourceManager::getInstance()->unload(this->soundBuffers[action]);
     116
    114117  else if (soundFile != NULL)
    115118  {
     
    330333  {
    331334    this->requestAction(WA_RELOAD);
     335    this->execute();
    332336  }
    333337}
     
    344348  {
    345349    this->requestAction(WA_DEACTIVATE);
     350    this->execute();
    346351    return false;
    347352  }
  • orxonox/trunk/src/world_entities/weapons/weapon.h

    r4927 r4930  
    110110
    111111    /** @param energyMax the maximum energy the Weapon can have @param energyLoadedMax the maximum energy in the weapon buffers */
    112     inline void setMaximumEnergy(float energyMax, float energyLoadedMax = 0.0) { this->energyMax = energyMax; this->energyLoadedMax = energyLoadedMax; };
     112    inline void setMaximumEnergy(float energyMax, float energyLoadedMax) { this->energyMax = energyMax; this->energyLoadedMax = energyLoadedMax; };
    113113
    114114    void setActionSound(WeaponAction action, const char* soundFile);
     
    185185
    186186    bool                 hideInactive;                    //!< Hides the Weapon if it is inactive
    187     bool                 chargeable;                      //!< if the Weapon is charcheable
     187    bool                 chargeable;                      //!< if the Weapon is charcheable (if true, the weapon will charge before it fires.)
    188188
    189189    Projectile*          projectile;                      //!< the projectile used for this weapon
  • orxonox/trunk/src/world_entities/weapons/weapon_manager.h

    r4926 r4930  
    104104    int                     currConfID;              //<! the currently selected config
    105105    weaponConfig            configs[4];              //<! a list of four configurations
    106 
    107106};
Note: See TracChangeset for help on using the changeset viewer.