Changeset 9217 in orxonox.OLD for branches/presentation/src/world_entities/weapons/boomerang_gun.cc
- Timestamp:
- Jul 5, 2006, 12:32:30 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/weapons/boomerang_gun.cc
r9206 r9217 15 15 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 16 16 17 #include " turret.h"17 #include "boomerang_gun.h" 18 18 19 19 #include "weapon_manager.h" … … 27 27 #include "util/loading/factory.h" 28 28 29 CREATE_FACTORY( Turret, CL_TURRET);29 CREATE_FACTORY(BoomerangGun, CL_BOOMERANG_GUN); 30 30 31 using namespace std;32 31 33 32 /** 34 33 * standard constructor 35 34 * 36 * creates a new Turret35 * creates a new BoomerangGun 37 36 */ 38 Turret::Turret()37 BoomerangGun::BoomerangGun () 39 38 : Weapon() 40 39 { … … 43 42 44 43 /** 45 * creates a new Turretfrom a TiXmlElement44 * creates a new BoomerangGun from a TiXmlElement 46 45 */ 47 Turret::Turret(const TiXmlElement* root)46 BoomerangGun::BoomerangGun(const TiXmlElement* root) 48 47 { 49 48 this->init(); … … 55 54 * standard deconstructor 56 55 */ 57 Turret::~Turret()56 BoomerangGun::~BoomerangGun () 58 57 { 59 58 // model will be deleted from WorldEntity-destructor 60 59 } 61 60 62 void Turret::init()61 void BoomerangGun::init() 63 62 { 64 this->setClassID(CL_ TURRET, "Turret");63 this->setClassID(CL_BOOMERANG_GUN, "BoomerangGun"); 65 64 66 65 … … 85 84 //this->minCharge = 2; 86 85 87 this->setCapability(WTYPE_ALLDIRS | WTYPE_ TURRET);88 this->setProjectileType(CL_ ROCKET);86 this->setCapability(WTYPE_ALLDIRS | WTYPE_BOMMERANG_GUN); 87 this->setProjectileType(CL_BOOMERANG_PROJECTILE); 89 88 90 this->loadModel("models/guns/turret1.obj" );89 this->loadModel("models/guns/turret1.obj", 5.0); 91 90 92 91 this->setEmissionPoint(1.684, 0.472, 0); … … 99 98 } 100 99 101 void Turret::loadParams(const TiXmlElement* root)100 void BoomerangGun::loadParams(const TiXmlElement* root) 102 101 { 103 102 Weapon::loadParams(root); 104 103 } 105 104 106 void Turret::activate()105 void BoomerangGun::activate() 107 106 { 108 107 } 109 108 110 void Turret::deactivate()109 void BoomerangGun::deactivate() 111 110 { 112 111 } 113 112 114 void Turret::tick(float dt)113 void BoomerangGun::tick(float dt) 115 114 { 116 115 if (!Weapon::tickW(dt)) … … 134 133 } 135 134 136 void Turret::fire()135 void BoomerangGun::fire() 137 136 { 138 137 Projectile* pj = this->getProjectile();
Note: See TracChangeset
for help on using the changeset viewer.