Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2008, 3:11:48 PM (17 years ago)
Author:
polakma
Message:

fixed WeaponPack attaching

File:
1 edited

Legend:

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

    r2288 r2319  
    3535
    3636#include "WeaponPack.h"
     37#include "objects/worldentities/pawns/Pawn.h"
    3738
    3839namespace orxonox
     
    4344
    4445        this->parentWeaponSystem_ = 0;
     46        this->firemode_ = 1;
    4547
    4648    }
     
    7678    void WeaponPack::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7779    {
    78 
     80        XMLPortObject(WeaponPack, Weapon, "", addWeapon, getWeapon, xmlelement, mode);
     81        XMLPortParam(WeaponPack, "firemode", setFireMode, getFireMode, xmlelement, mode);
    7982    }
    8083
     84    void WeaponPack::setFireMode(unsigned int firemode)
     85    {
     86        this->firemode_ = firemode;
     87    }
     88
     89    unsigned int WeaponPack::getFireMode()
     90    {
     91        return this->firemode_;
     92    }
     93
     94    void WeaponPack::addWeapon(Weapon * weapon)
     95    {
     96        this->weapons_.push_back(weapon);
     97    }
     98   
     99    Weapon * WeaponPack::getWeapon(unsigned int index)
     100    {
     101        return weapons_[index];
     102    }
    81103}
Note: See TracChangeset for help on using the changeset viewer.