Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 26, 2008, 7:42:29 PM (15 years ago)
Author:
polakma
Message:

added WeaponPack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc

    r2272 r2288  
    3636
    3737#include "WeaponSystem.h"
     38#include "WeaponPack.h"
    3839
    3940/* WEAPONSYSTEM
     
    5657    WeaponSystem::~WeaponSystem()
    5758    {
     59    }
     60
     61    void WeaponSystem::attachWeaponPack(WeaponPack *wPack, int setNumber)
     62    {
     63        this->weaponSets_[setNumber]->attachWeaponPack(wPack);
     64    }
     65
     66    void WeaponSystem::attachWeaponSlot(WeaponSlot *wSlot)
     67    {
     68        this->weaponSlots_.push_back(wSlot);
     69        wSlot->setParentWeaponSystem(this);
    5870    }
    5971
     
    90102    void WeaponSystem::fire(WeaponMode::Enum n)
    91103    {
     104COUT(0) << "WeaponSystem::fire" << std::endl;
    92105        if (n < (int)this->weaponSets_.size())
    93             this->weaponSets_[n]->fire();
     106COUT(0) << "WeaponSystem::fire - after if" << std::endl;
     107            //this->weaponSets_[n]->fire();
    94108    }
    95109
     
    103117    }
    104118
     119    WeaponSlot * WeaponSystem::getWeaponSlotPointer(unsigned int n)
     120    {
     121        if (n < this->weaponSlots_.size())
     122            return this->weaponSlots_[n];
     123        else
     124            return 0;
     125    }
     126
    105127    void WeaponSystem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    106128    {
Note: See TracChangeset for help on using the changeset viewer.