Changeset 4973 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons
- Timestamp:
- Aug 7, 2005, 10:54:07 AM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/turret.cc
r4969 r4973 28 28 #include "fast_factory.h" 29 29 30 CREATE_FACTORY(Turret); 30 31 31 32 using namespace std; … … 40 41 : Weapon(weaponManager) 41 42 { 42 this-> setClassID(CL_TURRET, "Turret");43 this->init(); 43 44 44 45 this->loadModel("models/turret1.obj"); 46 47 48 this->setActionSound(WA_SHOOT, "sound/shot1.wav"); 49 this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav"); 50 this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav"); 51 } 52 53 54 Turret::Turret(const TiXmlElement* root) 55 { 56 this->init(); 57 this->loadParams(root); 58 } 59 60 /** 61 * standard deconstructor 62 */ 63 Turret::~Turret () 64 { 65 // model will be deleted from WorldEntity-destructor 66 } 67 68 void Turret::init() 69 { 70 this->setClassID(CL_TURRET, "Turret"); 45 71 46 72 Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this); … … 64 90 //this->minCharge = 2; 65 91 66 this->setActionSound(WA_SHOOT, "sound/shot1.wav");67 this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav");68 this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav");69 92 70 93 this->setProjectile(CL_TEST_BULLET); 71 94 95 72 96 this->setEmissionPoint(1.684, 0.472, 0); 73 97 //this->getProjectileFactory()->prepare(100); 98 99 74 100 } 75 101 102 void Turret::loadParams(const TiXmlElement* root) 103 { 104 static_cast<Weapon*>(this)->loadParams(root); 76 105 77 /**78 * standard deconstructor79 */80 Turret::~Turret ()81 {82 // model will be deleted from WorldEntity-destructor83 106 } 84 107 -
orxonox/trunk/src/world_entities/weapons/turret.h
r4964 r4973 13 13 public: 14 14 Turret (WeaponManager* weaponManager); 15 Turret(const TiXmlElement* root); 15 16 virtual ~Turret (); 17 18 void init(); 19 void loadParams(const TiXmlElement* root); 16 20 17 21 virtual void activate();
Note: See TracChangeset
for help on using the changeset viewer.