Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10440 in orxonox.OLD for trunk/src/world_entities/weapons


Ignore:
Timestamp:
Jan 28, 2007, 2:09:09 PM (18 years ago)
Author:
patrick
Message:

making weapons loadable

Location:
trunk/src/world_entities/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/weapon_slot.cc

    r10437 r10440  
    1919#include "weapon_slot.h"
    2020#include "util/loading/factory.h"
     21#include "util/loading/load_param.h"
    2122
    2223
     
    2728{
    2829  this->registerObject(this, WeaponSlot::_objectList);
    29 
    3030}
    3131
     
    3434   this->registerObject(this, WeaponSlot::_objectList);
    3535
     36   if( root != NULL)
     37     this->loadParams( root);
    3638}
    3739
     
    3941WeaponSlot::~WeaponSlot()
    4042{}
     43
     44
     45
     46void WeaponSlot::loadParams(const TiXmlElement* root)
     47{
     48  PNode::loadParams( root);
     49
     50    // now check for the orx class to create
     51  LoadParam(root, "WeaponClass", this, WeaponSlot, setWeaponClass)
     52  .describe("Sets the class this mount points should host");
     53}
     54
     55
     56
     57
     58void WeaponSlot::setWeaponClass()
     59{
     60
     61}
     62
  • trunk/src/world_entities/weapons/weapon_slot.h

    r10438 r10440  
    2323  virtual ~WeaponSlot();
    2424
     25  virtual void loadParams(const TiXmlElement* root);
     26
     27  void setWeaponClass();
    2528
    2629  long getCapability() { return this->capability; }
Note: See TracChangeset for help on using the changeset viewer.