[10437] | 1 | |
---|
| 2 | /* |
---|
| 3 | orxonox - the future of 3D-vertical-scrollers |
---|
| 4 | |
---|
| 5 | Copyright (C) 2004 orx |
---|
| 6 | |
---|
| 7 | This program is free software; you can redistribute it and/or modify |
---|
| 8 | it under the terms of the GNU General Public License as published by |
---|
| 9 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 10 | any later version. |
---|
| 11 | |
---|
| 12 | ### File Specific |
---|
| 13 | main-programmer: Patrick Boenzli |
---|
| 14 | |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON |
---|
| 18 | |
---|
| 19 | #include "weapon_slot.h" |
---|
| 20 | #include "util/loading/factory.h" |
---|
[10440] | 21 | #include "util/loading/load_param.h" |
---|
[10437] | 22 | |
---|
| 23 | |
---|
| 24 | ObjectListDefinition(WeaponSlot); |
---|
[10534] | 25 | CREATE_FACTORY(WeaponSlot); |
---|
[10437] | 26 | |
---|
| 27 | |
---|
[10534] | 28 | |
---|
[10437] | 29 | WeaponSlot::WeaponSlot() |
---|
| 30 | { |
---|
| 31 | this->registerObject(this, WeaponSlot::_objectList); |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | WeaponSlot::WeaponSlot(const TiXmlElement* root) |
---|
| 35 | { |
---|
| 36 | this->registerObject(this, WeaponSlot::_objectList); |
---|
| 37 | |
---|
[10440] | 38 | if( root != NULL) |
---|
| 39 | this->loadParams( root); |
---|
[10437] | 40 | } |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | WeaponSlot::~WeaponSlot() |
---|
[10698] | 44 | { |
---|
| 45 | } |
---|
[10440] | 46 | |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | void WeaponSlot::loadParams(const TiXmlElement* root) |
---|
| 50 | { |
---|
| 51 | PNode::loadParams( root); |
---|
| 52 | |
---|
| 53 | // now check for the orx class to create |
---|
| 54 | LoadParam(root, "WeaponClass", this, WeaponSlot, setWeaponClass) |
---|
| 55 | .describe("Sets the class this mount points should host"); |
---|
[10534] | 56 | |
---|
| 57 | LoadParam(root, "slot", this, WeaponSlot, setWeaponConfig) |
---|
[10698] | 58 | .describe("sets the weapon slot"); |
---|
| 59 | |
---|
| 60 | LoadParam(root, "currentWeapon", this, WeaponSlot, setCurrentWeapon) |
---|
| 61 | .describe("creates and set next weapon"); |
---|
| 62 | |
---|
| 63 | LoadParam(root, "nextWeapon", this, WeaponSlot, setNextWeapon) |
---|
| 64 | .describe("creates and set next weapon"); |
---|
[10440] | 65 | } |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | void WeaponSlot::setWeaponClass() |
---|
| 71 | { |
---|
| 72 | } |
---|
| 73 | |
---|