Changeset 11205
- Timestamp:
- May 26, 2016, 3:58:37 PM (8 years ago)
- Location:
- code/branches/sagerjFS16
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/data/levels/includes/weaponSettingsEscortDischarger.oxi
r11189 r11205 1 1 <weaponslots> 2 <WeaponSlot position="- 9.2,2,-13" />3 <WeaponSlot position=" 9.2,2,-13" />2 <WeaponSlot position="-10,0,0" /> 3 <WeaponSlot position=" 10,0,0" /> 4 4 </weaponslots> 5 5 <weaponsets> … … 25 25 <Weapon> 26 26 <Discharger 27 mode= 027 mode=1 28 28 munitionpershot=1 29 29 delay=0 -
code/branches/sagerjFS16/src/modules/overlays/hud/HUDChargeBar.cc
r11189 r11205 60 60 61 61 if(this->correspondingMode_->getCharges() > 0) // The HUDBar should only be visible when we are charging up 62 { 62 63 this->setVisible(true); 63 64 } -
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc
r11189 r11205 67 67 BillboardProjectile* projectile = new BillboardProjectile(this->getContext()); 68 68 69 if(this->charges_ < this->thresholdOne_) 70 { 71 projectile->setMaterial("Flares/lensflare"); 72 } 73 else 74 { 75 if(this->charges_ < this->thresholdTwo_) 76 { 77 projectile->setMaterial("Flares/ringflare"); 78 } 79 else 80 { 81 projectile->setMaterial("Flares/ringflare2"); 82 } 83 } 84 85 projectile->setScale(1+this->charges_/10); 86 69 87 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 70 88 projectile->setOrientation(this->getMuzzleOrientation()); -
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h
r11189 r11205 53 53 public: 54 54 Discharger(Context* context); 55 virtual ~Discharger() {} 55 virtual ~Discharger() {} // declaration for the constructor 56 56 57 virtual void fire() override; 57 virtual void fire() override; // declaration of specific fire function of each weapon 58 58 59 59 private: 60 float speed_; // The speed of the fired projectile. 61 60 float speed_; // The speed of the fired projectile. 61 const unsigned int thresholdOne_ = 50; // Threshold amount of charges where the projectile changes the first time 62 const unsigned int thresholdTwo_ = 100; // Threshold amount of charges where the projectile changes the second time 62 63 }; 63 64 }
Note: See TracChangeset
for help on using the changeset viewer.