Changeset 10669 in orxonox.OLD for branches/vs-enhencements/src/world_entities/weapons
- Timestamp:
- Jun 3, 2007, 10:17:15 PM (18 years ago)
- Location:
- branches/vs-enhencements/src/world_entities/weapons
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/weapons/weapon_manager.cc
r10544 r10669 1 2 1 /* 3 2 orxonox - the future of 3D-vertical-scrollers … … 146 145 BaseObject::loadParams(root); 147 146 148 LoadParam(root, "slot -count", this, WeaponManager, setSlotCount)147 LoadParam(root, "slotCount", this, WeaponManager, setSlotCount) 149 148 .describe("how many slots(cannons) the WeaponManager can handle"); 149 150 150 151 151 LOAD_PARAM_START_CYCLE(root, element); … … 156 156 } 157 157 LOAD_PARAM_END_CYCLE(element); 158 159 158 160 } 159 161 … … 357 359 * @param slotCapability the capability @see WeaponSlotCapability 358 360 */ 359 void WeaponManager::setSlotCapability(int slot, long slotCapability)361 void WeaponManager::setSlotCapability(int slot, unsigned long slotCapability) 360 362 { 361 363 if (slot > slotCount) -
branches/vs-enhencements/src/world_entities/weapons/weapon_manager.h
r10437 r10669 60 60 // setting up the WeaponManager with the following functions 61 61 void setSlotPosition(int slot, const Vector& position, PNode* parent = NULL); 62 // inline void setSlotPosition(float slot, float x, float y,float z) {setSlotPosition((int)slot, Vector(x,y,z));}; 62 63 void setSlotDirection(int slot, const Quaternion& rotation); 63 64 /** @param slot the slot to get the relative position from @returns the relative position of the Carrier to the Slot */ 64 65 const Vector& getSlotPosition(int slot) const; 65 void setSlotCapability(int slot, long slotCapability);66 void setSlotCapability(int slot, unsigned long slotCapability); 66 67 /** @param slot the slot to get the capabilities from @returns the capabilies */ 67 68 long getSlotCapability(int slot) const; … … 76 77 bool addWeapon(Weapon* weapon, int configID = -1, int slotID = -1); 77 78 void removeWeapon(Weapon* weapon, int configID = -1); 79 80 inline void createWeaponSlot(int slot, float x, float y, float z, long capability) { 81 this->setSlotPosition(slot, Vector( x, y, z)); 82 this->setSlotCapability(slot, capability); }; 83 84 inline void addWeaponToSlot(int config, int slot, const std::string& weaponName){ 85 this->addWeapon( Weapon::createWeapon( weaponName ), config, slot); }; 86 78 87 79 88 Weapon* getWeapon(int slotID) const; -
branches/vs-enhencements/src/world_entities/weapons/weapon_slot.cc
r10534 r10669 42 42 43 43 WeaponSlot::~WeaponSlot() 44 {} 44 { 45 } 45 46 46 47 … … 55 56 56 57 LoadParam(root, "slot", this, WeaponSlot, setWeaponConfig) 57 58 .describe("sets the weapon slot"); 58 59 } 59 60 … … 63 64 void WeaponSlot::setWeaponClass() 64 65 { 65 66 66 } 67 67
Note: See TracChangeset
for help on using the changeset viewer.