Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2008, 7:07:36 PM (16 years ago)
Author:
polakma
Message:

added new features to munition.h and weapon.h. tried to fix projectiles (still doesn't compile)

File:
1 edited

Legend:

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

    r2203 r2232  
    5252    }
    5353
    54     void WeaponSlot::attachWeapon(Weapon *weaponPointer)
    55     {
    56         this->attachedWeapon_ = weaponPointer;
    57     }
    58 
    5954
    6055    /*sets the munition type
     
    6762    }
    6863
     64
    6965    void WeaponSlot::fire()
    7066    {
     
    7268    }
    7369
     70
     71    //XMLPort functions
    7472    void WeaponSlot::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7573    {
    7674        SUPER(WeaponSlot, XMLPort, xmlelement, mode);
     75        XMLPortObject(WeaponSlot, Weapon, "attached-weapon", attachWeapon, getAttachedWeapon, xmlelement, mode);
    7776    }
    7877
     78    void WeaponSlot::attachWeapon(Weapon *weaponPointer)
     79    {   this->attachedWeapon_ = weaponPointer;   }
     80
     81    Weapon * WeaponSlot::getAttachedWeapon(unsigned int index) const
     82    {   return this->attachedWeapon_;   }
     83
     84
    7985}
Note: See TracChangeset for help on using the changeset viewer.