Changeset 4832 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
- Timestamp:
- Jul 11, 2005, 5:45:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
r4828 r4832 12 12 ### File Specific 13 13 main-programmer: Patrick Boenzli 14 co-programmer: 14 co-programmer: Benjamin Grauer 15 15 */ 16 16 … … 26 26 27 27 28 29 /** 30 * @brief this initializes the weaponManager for a given nnumber of weapon slots 28 /** 29 * this initializes the weaponManager for a given nnumber of weapon slots 31 30 * @param number of weapon slots of the model/ship <= 8 (limitied) 32 31 */ 33 32 WeaponManager::WeaponManager(int nrOfSlots) 34 33 { 35 34 this->setClassID(CL_WEAPON_MANAGER, "WeaponManager"); … … 63 62 64 63 /** 65 * @briefadds a weapon to the selected weaponconfiguration into the selected slot64 * adds a weapon to the selected weaponconfiguration into the selected slot 66 65 * @param the weapon to add 67 66 * @param an identifier for the slot: number between 0..7 if not specified: slotID=next free slot 68 67 * @param an identifier for the weapon configuration, number between 0..3 69 70 if you add explicitly a weapon at config:n, slot:m, the weapon placed at this location will be71 72 73 74 */ 75 68 * 69 * if you add explicitly a weapon at config:n, slot:m, the weapon placed at this location will be 70 * replaced by the weapon specified. if you use the W_FREE_SLOT, the manager will look for a free 71 * slot in this weaponconfiguration. if there is non, the weapon won't be added and there will be 72 * a error message. 73 */ 74 void WeaponManager::addWeapon(Weapon* weapon, int configID, int slotID) 76 75 { 77 76 if( slotID == W_FREE_SLOT) … … 101 100 102 101 /** 103 * @briefchanges to the next weapon configuration104 105 106 107 */ 108 102 * changes to the next weapon configuration 103 * 104 * if there are multiple weapon configurations defined by the manager, use this to switch between them 105 * this function will deactivate the weapons first, change the config and reactivate them later 106 */ 107 void WeaponManager::nextWeaponConf() 109 108 { 110 109 PRINTF(4)("Changing weapon configuration: from %i to next\n", this->currConfID); … … 146 145 147 146 /** 148 * @brieftriggers fire of all weapons in the current weaponconfig149 */ 150 147 * triggers fire of all weapons in the current weaponconfig 148 */ 149 void WeaponManager::fire() 151 150 { 152 151 Weapon* firingWeapon; … … 160 159 161 160 /** 162 * @brieftriggers tick of all weapons in the current weaponconfig163 164 */ 165 161 * triggers tick of all weapons in the current weaponconfig 162 * @param second passed since last tick 163 */ 164 void WeaponManager::tick(float sec) 166 165 { 167 166 Weapon* w; … … 175 174 176 175 /** 177 * @brieftriggers draw of all weapons in the current weaponconfig176 * triggers draw of all weapons in the current weaponconfig 178 177 */ 179 178 void WeaponManager::draw() … … 189 188 190 189 /** 191 * @briefprivate gets the next free slot in a certain weaponconfig192 193 */ 194 190 * private gets the next free slot in a certain weaponconfig 191 * @param the selected weaponconfig 192 */ 193 int WeaponManager::getNextFreeSlot(int configID) 195 194 { 196 195 for( int i = 0; i < W_MAX_SLOTS; ++i)
Note: See TracChangeset
for help on using the changeset viewer.