Changeset 4930 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons
- Timestamp:
- Jul 22, 2005, 2:11:21 AM (19 years ago)
- 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 105 105 this->setStateDuration(WS_DEACTIVATING, .4); 106 106 107 this->setMaximumEnergy(1000, 10); 107 108 this->increaseEnergy(100); 108 109 //this->minCharge = 2; -
orxonox/trunk/src/world_entities/weapons/weapon.cc
r4927 r4930 88 88 89 89 this->energyLoaded = .0; 90 this->energyLoadedMax = 10.0;90 this->energyLoadedMax = 5.0; 91 91 this->energy = .0; 92 this->energyMax = 10 0.0;92 this->energyMax = 10.0; 93 93 } 94 94 … … 112 112 if (action >= WA_ACTION_COUNT) 113 113 return; 114 if (this->soundBuffers[action] != NULL) 115 ResourceManager::getInstance()->unload(this->soundBuffers[action]); 116 114 117 else if (soundFile != NULL) 115 118 { … … 330 333 { 331 334 this->requestAction(WA_RELOAD); 335 this->execute(); 332 336 } 333 337 } … … 344 348 { 345 349 this->requestAction(WA_DEACTIVATE); 350 this->execute(); 346 351 return false; 347 352 } -
orxonox/trunk/src/world_entities/weapons/weapon.h
r4927 r4930 110 110 111 111 /** @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; }; 113 113 114 114 void setActionSound(WeaponAction action, const char* soundFile); … … 185 185 186 186 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.) 188 188 189 189 Projectile* projectile; //!< the projectile used for this weapon -
orxonox/trunk/src/world_entities/weapons/weapon_manager.h
r4926 r4930 104 104 int currConfID; //<! the currently selected config 105 105 weaponConfig configs[4]; //<! a list of four configurations 106 107 106 };
Note: See TracChangeset
for help on using the changeset viewer.