Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3993 in orxonox.OLD for orxonox/trunk/src/world_entities/test_gun.cc


Ignore:
Timestamp:
Apr 27, 2005, 12:12:28 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: patch to use relative coordinates again, some smaller changes in the preLoading/loading mechanisms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3987 r3993  
    4949  this->objectComponent1 = new PNode();
    5050  this->animation1 = new Animation3D(this->objectComponent1);
    51   //this->animation2 = new Animation3D(this);
     51  this->animation2 = new Animation3D(this);
     52  this->animation3 = new Animation3D(this);
    5253  //parent->addChild(this->objectComponent1, PNODE_ALL);
    5354  this->addChild(this->objectComponent1, PNODE_ALL);
    5455
    5556  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);
    5759  if( this->leftRight == W_LEFT)
    5860    {
     
    6769      this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT);
    6870
    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);
    7376    }
    7477  else if( this->leftRight == W_RIGHT)
     
    8689
    8790
     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);
    8896      //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
    8997      //this->animation2->addKeyFrame(Vector(0, 0, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     
    112120void TestGun::activate()
    113121{
    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();
    116126}
    117127
     
    127137{
    128138  printf("DEACTIVATE\n");
     139  this->animation3->replay();
    129140}
    130141
     
    200211  //this->getRelCoor().debug();
    201212  //this->getAbsCoor().debug();
    202 
    203   this->objectComponent1->getRelCoor().debug();
     213  //this->objectComponent1->getRelCoor().debug();
    204214  //this->objectComponent1->getAbsCoor().debug();
    205215
Note: See TracChangeset for help on using the changeset viewer.