Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 11, 2005, 5:45:27 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: loadParams and timing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapons/weapon_manager.cc

    r4828 r4832  
    1212### File Specific
    1313   main-programmer: Patrick Boenzli
    14    co-programmer:
     14   co-programmer: Benjamin Grauer
    1515*/
    1616
     
    2626
    2727
    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
    3130 * @param number of weapon slots of the model/ship <= 8 (limitied)
    3231 */
    33               WeaponManager::WeaponManager(int nrOfSlots)
     32WeaponManager::WeaponManager(int nrOfSlots)
    3433{
    3534  this->setClassID(CL_WEAPON_MANAGER, "WeaponManager");
     
    6362
    6463/**
    65  * @brief adds a weapon to the selected weaponconfiguration into the selected slot
     64 * adds a weapon to the selected weaponconfiguration into the selected slot
    6665 * @param the weapon to add
    6766 * @param an identifier for the slot: number between 0..7 if not specified: slotID=next free slot
    6867 * @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 be
    71              replaced by the weapon specified. if you use the W_FREE_SLOT, the manager will look for a free
    72              slot in this weaponconfiguration. if there is non, the weapon won't be added and there will be
    73              a error message.
    74  */
    75               void WeaponManager::addWeapon(Weapon* weapon, int configID, int slotID)
     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 */
     74void WeaponManager::addWeapon(Weapon* weapon, int configID, int slotID)
    7675{
    7776  if( slotID == W_FREE_SLOT)
     
    101100
    102101/**
    103    * @brief changes to the next weapon configuration
    104 
    105              if there are multiple weapon configurations defined by the manager, use this to switch between them
    106              this function will deactivate the weapons first, change the config and reactivate them later
    107  */
    108               void WeaponManager::nextWeaponConf()
     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 */
     107void WeaponManager::nextWeaponConf()
    109108{
    110109  PRINTF(4)("Changing weapon configuration: from %i to next\n", this->currConfID);
     
    146145
    147146/**
    148    * @brief triggers fire of all weapons in the current weaponconfig
    149  */
    150               void WeaponManager::fire()
     147 * triggers fire of all weapons in the current weaponconfig
     148 */
     149void WeaponManager::fire()
    151150{
    152151  Weapon* firingWeapon;
     
    160159
    161160/**
    162    * @brief triggers tick of all weapons in the current weaponconfig
    163               * @param second passed since last tick
    164  */
    165               void WeaponManager::tick(float sec)
     161 * triggers tick of all weapons in the current weaponconfig
     162 * @param second passed since last tick
     163 */
     164void WeaponManager::tick(float sec)
    166165{
    167166  Weapon* w;
     
    175174
    176175/**
    177    * @brief triggers draw of all weapons in the current weaponconfig
     176 * triggers draw of all weapons in the current weaponconfig
    178177 */
    179178void WeaponManager::draw()
     
    189188
    190189/**
    191    * @brief private gets the next free slot in a certain weaponconfig
    192               * @param the selected weaponconfig
    193  */
    194               int WeaponManager::getNextFreeSlot(int configID)
     190 * private gets the next free slot in a certain weaponconfig
     191 * @param the selected weaponconfig
     192 */
     193int WeaponManager::getNextFreeSlot(int configID)
    195194{
    196195  for( int i = 0; i < W_MAX_SLOTS; ++i)
Note: See TracChangeset for help on using the changeset viewer.