Changeset 11166 for code/branches/sagerjFS16/src/modules
- Timestamp:
- Apr 14, 2016, 4:02:00 PM (9 years ago)
- Location:
- code/branches/sagerjFS16/src/modules/weapons
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/modules/weapons/WeaponsPrereqs.h
r11052 r11166 107 107 class SimpleRocketFire; 108 108 class GravityBombFire; 109 class Discharger; 109 110 } 110 111 -
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/CMakeLists.txt
r11108 r11166 13 13 GravityBombFire.cc 14 14 MineGun.cc 15 Discharger.cc 15 16 ) -
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc
r11153 r11166 51 51 RegisterObject(Discharger); 52 52 53 this->reloadTime_ = 0.1f; 54 this->damage_ = 9000.1f*loaded_; 55 this->speed_ = 9000.1f*loaded_; 56 57 this->setMunitionName("dEnergy"); 58 this->setFireSound("sounds/Weapon_Discharger.ogg"); 59 this->setReloadSound("sounds/Reload_Discharger.ogg", 0.8); 53 this->setMunitionName("LaserMunition"); 60 54 61 55 hudImageString_ = "Orxonox/WSHUD_WM_LaserFire"; 62 56 } 63 57 64 /**65 @brief66 Fires the weapon. Creates a projectile and fires it.67 */68 58 void Discharger::fire() 69 59 { 70 /*BillboardProjectile* projectile = new BillboardProjectile(this->getContext()); 71 72 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 73 projectile->setOrientation(this->getMuzzleOrientation()); 74 projectile->setPosition(this->getMuzzlePosition()); 75 projectile->setVelocity(this->getMuzzleDirection() * this->speed_); 76 77 projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 78 projectile->setDamage(this->getDamage()); 79 projectile->setShieldDamage(this->getShieldDamage()); 80 projectile->setHealthDamage(this->getHealthDamage());*/ 81 extern unsigned int beginLoad_ = time; 60 orxout() << "fire dis " << endl; 82 61 } 83 void Discharger::release() 62 63 bool Discharger::fire(float* reloadTime) 84 64 { 85 extern unsigned int endLoad_ = time; 86 extern unsigned int loaded_ = endLoad_ - beginLoad_; 87 65 orxout() << "fire Discharger " << endl; 66 return false; 67 } 68 bool Discharger::release(float* reloadTime) 69 { 70 orxout() << "release Discharger " << endl; 71 return false; 88 72 } 89 73 } -
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h
r11153 r11166 55 55 56 56 virtual void fire() override; 57 virtual void release() override; 57 virtual bool fire(float* reloadTime) override; 58 virtual bool release(float* reloadTime) override; 58 59 59 60 private: 60 float speed_; //!< The speed of the fired projectile.61 float loaded_; // The time how long the weapon charged62 float beginLoad_;63 float endLoad_;64 61 }; 65 62 }
Note: See TracChangeset
for help on using the changeset viewer.