- Timestamp:
- Jun 27, 2008, 8:07:29 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/orxonox/objects/RotatingProjectile.cc
r1505 r1629 37 37 CreateFactory(RotatingProjectile); 38 38 39 RotatingProjectile::RotatingProjectile(SpaceShip* owner) : Projectile(owner)39 RotatingProjectile::RotatingProjectile(SpaceShip* owner) : BillboardProjectile(owner) 40 40 { 41 41 RegisterObject(RotatingProjectile); … … 73 73 void RotatingProjectile::tick(float dt) 74 74 { 75 this->time_ += dt; 75 if (this->isActive()) 76 { 77 this->time_ += dt; 76 78 77 this->rotatingNode1_->setPosition(0, 50 * sin(this->time_ * 20), 50 * cos(this->time_ * 20)); 78 this->rotatingNode2_->setPosition(0, -50 * sin(this->time_ * 20), -50 * cos(this->time_ * 20)); 79 this->rotatingNode1_->setPosition(0, 50 * sin(this->time_ * 20), 50 * cos(this->time_ * 20)); 80 this->rotatingNode2_->setPosition(0, -50 * sin(this->time_ * 20), -50 * cos(this->time_ * 20)); 81 } 79 82 80 83 Projectile::tick(dt); 81 84 } 85 86 void RotatingProjectile::changedVisibility() 87 { 88 BillboardProjectile::changedVisibility(); 89 this->rotatingBillboard1_.setVisible(this->isVisible()); 90 this->rotatingBillboard2_.setVisible(this->isVisible()); 91 } 82 92 }
Note: See TracChangeset
for help on using the changeset viewer.