- Timestamp:
- Nov 12, 2008, 12:50:18 PM (16 years ago)
- Location:
- code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc
r2145 r2186 34 34 #include "util/Debug.h" 35 35 36 #include "LaserGun.h" 37 36 38 37 39 namespace orxonox … … 41 43 RegisterObject(LaserGun); 42 44 43 this->attachNeededMunition();44 45 45 //set weapon properties here 46 this->projectileColor_ = ColourValue(1.0, 1.0, 0.5)47 46 this->loadingTime_ = 0.5; 48 47 } … … 76 75 } 77 76 78 ColorValue LaserGun::getProjectileColor()79 {80 return projectileColor_;81 }82 83 void attachNeededMunition(Munition *pointerToMunition)84 {85 //if munition type already exist attach it, else create a new one of this type and attach it to the weapon and to the WeaponSystem86 if ( this->parentWeaponSystem_->munitionSet_[laserGunMunition] )87 this->pointerToMunition_ = pointerToMunition;88 else89 {90 this->pointerToMunition_ = new LaserGunMunition;91 92 }93 }94 77 } -
code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.h
r2145 r2186 34 34 #include "core/BaseObject.h" 35 35 36 #include " LaserGunMunition.h"36 #include "../munitions/LaserGunMunition.h" 37 37 #include "util/Math.h" 38 #include "../Weapon.h" 38 39 39 40 namespace orxonox … … 48 49 49 50 void fire(); 50 ColourValue LaserGun::getProjectileColour(); 51 51 52 52 53 private: 53 ColorValue projectileColor_; 54 54 55 55 56 };
Note: See TracChangeset
for help on using the changeset viewer.