Changeset 3993 in orxonox.OLD for orxonox/trunk/src/world_entities/test_gun.cc
- Timestamp:
- Apr 27, 2005, 12:12:28 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/test_gun.cc
r3987 r3993 49 49 this->objectComponent1 = new PNode(); 50 50 this->animation1 = new Animation3D(this->objectComponent1); 51 //this->animation2 = new Animation3D(this); 51 this->animation2 = new Animation3D(this); 52 this->animation3 = new Animation3D(this); 52 53 //parent->addChild(this->objectComponent1, PNODE_ALL); 53 54 this->addChild(this->objectComponent1, PNODE_ALL); 54 55 55 56 this->animation1->setInfinity(ANIM_INF_CONSTANT); 56 //this->animation2->setInfinity(ANIM_INF_CONSTANT); 57 this->animation2->setInfinity(ANIM_INF_CONSTANT); 58 this->animation3->setInfinity(ANIM_INF_CONSTANT); 57 59 if( this->leftRight == W_LEFT) 58 60 { … … 67 69 this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT); 68 70 69 70 //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR); 71 //this->animation2->addKeyFrame(Vector(0, 0, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR); 72 //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR); 71 this->animation2->addKeyFrame(Vector(-2.6, 0.1, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 72 this->animation2->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 73 74 this->animation3->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 75 this->animation3->addKeyFrame(Vector(-2.6, 0.1, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 73 76 } 74 77 else if( this->leftRight == W_RIGHT) … … 86 89 87 90 91 this->animation2->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 92 this->animation2->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 93 94 this->animation3->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 95 this->animation3->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 88 96 //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR); 89 97 //this->animation2->addKeyFrame(Vector(0, 0, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR); … … 112 120 void TestGun::activate() 113 121 { 114 printf("ACTIVATE \n"); 115 //this->animation2->replay(); 122 if( this->leftRight == W_RIGHT) printf("ACTIVATE right weapon\n"); 123 else printf("ACTIVATE left weapon\n"); 124 125 this->animation2->replay(); 116 126 } 117 127 … … 127 137 { 128 138 printf("DEACTIVATE\n"); 139 this->animation3->replay(); 129 140 } 130 141 … … 200 211 //this->getRelCoor().debug(); 201 212 //this->getAbsCoor().debug(); 202 203 this->objectComponent1->getRelCoor().debug(); 213 //this->objectComponent1->getRelCoor().debug(); 204 214 //this->objectComponent1->getAbsCoor().debug(); 205 215
Note: See TracChangeset
for help on using the changeset viewer.