Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Apr 26, 2005, 2:48:43 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: started to implement the weapon change animation

File:
1 edited

Legend:

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

    r3888 r3980  
    4949  this->objectComponent1 = new PNode();
    5050  this->animation1 = new Animation3D(this->objectComponent1);
     51  //this->animation2 = new Animation3D(this);
    5152  parent->addChild(this->objectComponent1, PNODE_ALL);
    5253
    5354  this->animation1->setInfinity(ANIM_INF_CONSTANT);
    54   // ANIM_LINEAR was ANIM_NEG_EXP
     55  //this->animation2->setInfinity(ANIM_INF_CONSTANT);
    5556  if( this->leftRight == W_LEFT)
    5657    {
     
    6061      this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR);
    6162      this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);
     63
     64      //this->animation2->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     65      //this->animation2->addKeyFrame(Vector(-2.6, 0.1, 1.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
    6266    }
    6367  else if( this->leftRight == W_RIGHT)
     
    6569      this->projectileOffset = Vector(1.0, 0.0, 0.5);
    6670
    67       this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
    68       this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_LINEAR);
    69       this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
     71      this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_NEG_EXP);
     72      this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_NEG_EXP);
     73      this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_NEG_EXP);
    7074    }
    7175}
     
    8993*/
    9094void TestGun::activate()
    91 {}
     95{
     96  printf("ACTIVATE \n");
     97  this->animation2->replay();
     98}
    9299
    93100
     
    100107*/
    101108void TestGun::deactivate()
    102 {}
     109{
     110  printf("DEACTIVATE\n");
     111}
    103112
    104113
Note: See TracChangeset for help on using the changeset viewer.