Changeset 2060 for code/branches/weapon/src/orxonox/objects/weaponSystem
- Timestamp:
- Oct 29, 2008, 4:13:10 PM (16 years ago)
- Location:
- code/branches/weapon/src/orxonox/objects/weaponSystem
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapon/src/orxonox/objects/weaponSystem/Weapon.h
r2049 r2060 46 46 47 47 void addMunition(); 48 v oid fire();48 virtual void fire(); 49 49 50 50 private: 51 51 int loadingTime; 52 52 Munition *munition_; 53 53 -
code/branches/weapon/src/orxonox/objects/weaponSystem/WeaponSet.cc
r2049 r2060 38 38 namespace orxonox 39 39 { 40 WeaponSet::WeaponSet( )40 WeaponSet::WeaponSet(int k) 41 41 { 42 42 RegisterObject(WeaponSet); 43 44 for (int i=0;i<k;i++) 45 { 46 this->wSlotNew = new WeaponSlot(); 47 attachWeaponSlot(wSlotNew); 48 } 43 49 } 44 50 … … 63 69 } 64 70 71 WeaponSlot * getWeaponSlotPointer(int n) 72 { 73 return this->weaponSlots_[n]; 74 } 75 76 65 77 void WeaponSet::XMLPort(Element& xmlelement, XMLPort::Mode mode) 66 78 { -
code/branches/weapon/src/orxonox/objects/weaponSystem/WeaponSet.h
r2049 r2060 43 43 { 44 44 public: 45 WeaponSet( );45 WeaponSet(int k); 46 46 virtual ~WeaponSet(); 47 47 … … 50 50 void WeaponSet::attachWeaponSlot(WeaponSlot *wSlot); 51 51 void WeaponSet::fire(); 52 WeaponSlot * getWeaponSlotPointer(int n); 53 52 54 inline void WeaponSet::setParentWeaponSystem(WeaponSystem *parentWeaponSystem) 53 55 { parentWeaponSystem_=parentWeaponSystem; } -
code/branches/weapon/src/orxonox/objects/weaponSystem/WeaponSlot.cc
r2049 r2060 59 59 void WeaponSlot::setAmmoType(bool isUnlimited) 60 60 { 61 if (isUnlimited == true) 62 unlimitedAmmo_ = true; 63 else unlimitedAmmo_ = false; 61 unlimitedAmmo_ = isUnlimited; 64 62 } 65 63 -
code/branches/weapon/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc
r2049 r2060 40 40 { 41 41 RegisterObject(LaserGun); 42 43 projectileColor_ = ColourValue(1.0, 1.0, 0.5) 42 44 } 43 45 … … 46 48 } 47 49 50 LaserGun::fire() 51 { 52 BillboardProjectile* projectile = new ParticleProjectile(this); 53 projectile->setColour(this->projectileColor_); 54 projectile->create(); 55 if (projectile->getClassID() == 0) 56 { 57 COUT(3) << "generated projectile with classid 0" << std::endl; // TODO: remove this output 58 } 59 60 projectile->setObjectMode(0x3); 61 } 62 48 63 LaserGun::addMunition() 49 64 { 50 this->munition_ =65 //this->munition_ = ; 51 66 } 52 67 … … 56 71 } 57 72 73 ColorValue LaserGun::getProjectileColor() 74 { 75 return projectileColor_; 76 } 58 77 } -
code/branches/weapon/src/orxonox/objects/weaponSystem/weapons/LaserGun.h
r2049 r2060 35 35 36 36 #include "LaserGunMunition.h" 37 #include "../tools/BillboardSet.h" 37 38 38 39 namespace orxonox … … 46 47 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 47 48 48 49 ColourValue LaserGun::getProjectileColour(); 49 50 50 51 private: 52 ColorValue projectileColor_; 51 53 52 54
Note: See TracChangeset
for help on using the changeset viewer.