Changeset 5623 in orxonox.OLD for branches/world_entities/src
- Timestamp:
- Nov 17, 2005, 1:22:17 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/world_entities/src/world_entities/weapons/cannon.cc
r5622 r5623 52 52 { 53 53 this->init(); 54 } 55 56 57 Cannon::Cannon(const TiXmlElement* root) 58 { 59 this->init(); 60 this->loadParams(root); 61 } 62 63 /** 64 * standard deconstructor 65 */ 66 Cannon::~Cannon () 67 { 68 // model will be deleted from WorldEntity-destructor 69 } 70 71 72 void Cannon::init() 73 { 74 this->setClassID(CL_CANNON, "Cannon"); 75 76 // this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN); 77 78 this->loadModel("models/guns/cannon.obj"); 79 80 this->setStateDuration(WS_SHOOTING, .1); 81 this->setStateDuration(WS_RELOADING, .1); 82 this->setStateDuration(WS_ACTIVATING, .4); 83 this->setStateDuration(WS_DEACTIVATING, .4); 84 85 this->setMaximumEnergy(1000, 100); 86 this->increaseEnergy(1000); 87 //this->minCharge = 2; 88 89 this->setActionSound(WA_SHOOT, "sound/shot1.wav"); 90 91 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 92 this->setProjectileType(CL_LASER); 93 this->prepareProjectiles(20); 54 94 55 95 // this->objectComponent1 = new PNode(); … … 64 104 animation3->setInfinity(ANIM_INF_CONSTANT); 65 105 66 106 this->setEmissionPoint(3.8, 1.2, 0); 67 107 68 108 // animation1->addKeyFrame(Vector(0, -1.5, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL); … … 70 110 // animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_NULL); 71 111 72 animation2->addKeyFrame(Vector(0.0, -1.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 73 animation2->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 74 75 animation3->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 76 animation3->addKeyFrame(Vector(0.0, -1.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 77 } 78 79 80 Cannon::Cannon(const TiXmlElement* root) 81 { 82 this->init(); 83 this->loadParams(root); 84 } 85 86 /** 87 * standard deconstructor 88 */ 89 Cannon::~Cannon () 90 { 91 // model will be deleted from WorldEntity-destructor 92 } 93 94 95 void Cannon::init() 96 { 97 this->setClassID(CL_CANNON, "Cannon"); 98 99 // this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN); 100 101 this->loadModel("models/guns/cannon.obj"); 102 103 this->setStateDuration(WS_SHOOTING, .1); 104 this->setStateDuration(WS_RELOADING, .1); 105 this->setStateDuration(WS_ACTIVATING, .4); 106 this->setStateDuration(WS_DEACTIVATING, .4); 107 108 this->setMaximumEnergy(1000, 100); 109 this->increaseEnergy(1000); 110 //this->minCharge = 2; 111 112 this->setActionSound(WA_SHOOT, "sound/shot1.wav"); 113 114 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 115 this->setProjectileType(CL_LASER); 116 this->prepareProjectiles(20); 117 112 animation2->addKeyFrame(Vector(0.0, -1.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 113 animation2->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 114 115 animation3->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 116 animation3->addKeyFrame(Vector(0.0, -1.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 118 117 } 119 118
Note: See TracChangeset
for help on using the changeset viewer.