Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3862 in orxonox.OLD for orxonox/trunk/src/world_entities/weapon.cc


Ignore:
Timestamp:
Apr 18, 2005, 9:15:08 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: introducing weapon configuration and slots. some mechanisms to load (pre)defined weapon constellations and to use multiple guns at the same time. depending on the number of weapon slots a ship defines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapon.cc

    r3810 r3862  
    2929
    3030
     31
     32WeaponManager::WeaponManager(int nrOfSlots)
     33{
     34  this->nrOfSlots = nrOfSlots;
     35  this->nrOfConfigs = 1;
     36
     37  for(int i = 0; i < W_MAX_CONFS; ++i)
     38    this->configs[i] = NULL;
     39  this->currentConfig = new weaponConfig;
     40  this->configs[0] = this->currentConfig;
     41}
     42
     43WeaponManager::~WeaponManager()
     44{
     45
     46}
     47
     48void WeaponManager::addWeapon(Weapon* weapon, slotID slot, configID config)
     49{
     50  if(this->configs[config] == NULL)
     51    PRINTF(0)("");
     52  //  this->configs[(int)config]->
     53}
     54
     55void WeaponManager::addWeaponConfig(weaponConfig* config)
     56{}
     57
     58void WeaponManager::nextWeaponConf()
     59{}
     60
     61void WeaponManager::prevWeaponConf()
     62{}
     63
     64
     65void WeaponManager::selectConfig(configID config)
     66{
     67  if( this->configs[(int)config] != NULL)
     68    this->currentConfig = this->configs[(int)config];
     69  else
     70    PRINTF(0)("There is no weapon config defined with the number W_CONF%i", (int)config);
     71}
     72
     73
     74
    3175/**
    3276   \brief standard constructor
Note: See TracChangeset for help on using the changeset viewer.