Changeset 6431 in orxonox.OLD for trunk/src/world_entities/weapons
- Timestamp:
- Jan 8, 2006, 12:52:23 AM (19 years ago)
- Location:
- trunk/src/world_entities/weapons
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/bomb.cc
r6222 r6431 46 46 this->loadModel("models/projectiles/RadioActiveBomb.obj", 1.0); 47 47 48 this->energyMin = 1; 49 this->energyMax = 1; 48 this->setMinEnergy(1); 49 this->setMaxEnergy(10); 50 50 51 this->lifeSpan = 15; 51 52 -
trunk/src/world_entities/weapons/guided_missile.cc
r6426 r6431 41 41 this->loadModel("models/projectiles/orx-rocket.obj", .3); 42 42 43 this-> energyMin = 1;44 this-> energyMax = 10;43 this->setMinEnergy(1); 44 this->setMaxEnergy(10); 45 45 this->lifeSpan = 10.0; 46 46 this->agility = 500; … … 146 146 { 147 147 148 148 149 149 if (this->target != NULL && this->target->getParent() != PNode::getNullParent()) 150 150 { -
trunk/src/world_entities/weapons/laser.cc
r6222 r6431 42 42 this->loadModel("models/projectiles/laser.obj"); 43 43 44 this-> energyMin = 1;45 this-> energyMax = 10;44 this->setMinEnergy(1); 45 this->setMaxEnergy(10); 46 46 this->lifeSpan = 5.0; 47 47 -
trunk/src/world_entities/weapons/projectile.cc
r6142 r6431 53 53 54 54 55 void Projectile::set Energies(float energyMin, float energyMax)55 void Projectile::setMinEnergy(float energyMin) 56 56 { 57 57 this->energyMin = energyMin; 58 if (energyMax <= energyMin)59 {60 this->bChargeable = false;61 this->energyMax = energyMin;62 }63 else64 {65 this->bChargeable = true;66 this->energyMax = energyMax;67 }68 58 } 69 59 -
trunk/src/world_entities/weapons/projectile.h
r6078 r6431 23 23 24 24 25 void set Energies(float energyMin, float energyMax);25 void setMinEnergy(float energyMin); 26 26 /** @returns the minimal charched energy */ 27 inline float getEnergyMin() { return this->energyMin; }; 28 /** @returns the maximal charched energy */ 29 inline float getEnergyMax() { return this->energyMax; }; 27 inline float getMinEnergy() { return this->energyMin; }; 30 28 /** @returns if the Projectile can be charged */ 31 29 inline bool isChageable() { return this->bChargeable; }; … … 50 48 // energy 51 49 float energyMin; //!< The minimal Energy a Projectile needs to be emitted. 52 float energyMax; //!< The maximal Energy a Projectile can take, before being emitted.53 50 bool bChargeable; //!< if the Projectile is Charegeable 54 51 -
trunk/src/world_entities/weapons/rocket.cc
r6222 r6431 42 42 this->loadModel("models/projectiles/orx-rocket.obj", .3); 43 43 44 this-> energyMin = 1;45 this-> energyMax = 10;44 this->setMinEnergy(1); 45 this->setMaxEnergy(10); 46 46 this->lifeSpan = 5; 47 47 -
trunk/src/world_entities/weapons/test_bullet.cc
r6222 r6431 42 42 this->loadModel("models/projectiles/orx-rocket.obj", .3); 43 43 44 this-> energyMin = 1;45 this-> energyMax = 10;44 this->setMinEnergy(1); 45 this->setMaxEnergy(10); 46 46 this->lifeSpan = 2; 47 47 -
trunk/src/world_entities/weapons/weapon.cc
r6306 r6431 144 144 // grabbing Parameters from the Projectile to have them at hand here. 145 145 Projectile* pj = dynamic_cast<Projectile*>(this->projectileFactory->resurrect()); 146 this->minCharge = pj->get EnergyMin();147 this->maxCharge = pj->get EnergyMax();146 this->minCharge = pj->getMinEnergy(); 147 this->maxCharge = pj->getMaxEnergy(); 148 148 this->chargeable = pj->isChageable(); 149 149 this->projectileFactory->kill(pj);
Note: See TracChangeset
for help on using the changeset viewer.