Changeset 10107 in orxonox.OLD for branches/playability/src/world_entities/space_ships
- Timestamp:
- Dec 19, 2006, 10:03:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/space_ships/space_ship.cc
r10099 r10107 585 585 void SpaceShip::destroy( WorldEntity* killer ) 586 586 { 587 PRINTF( 0)("spaceship destroy\n");587 PRINTF(5)("spaceship destroy\n"); 588 588 589 589 EmitterNode* node = NULL; … … 591 591 SpriteParticles* explosionParticles = NULL; 592 592 593 explosionParticles = new SpriteParticles( 100);594 explosionParticles->setName(" MBoltExplosionParticles");595 explosionParticles->setLifeSpan(. 5, .3);593 explosionParticles = new SpriteParticles(200); 594 explosionParticles->setName("SpaceShipExplosionParticles"); 595 explosionParticles->setLifeSpan(.2, .3); 596 596 explosionParticles->setRadius(0.0, 10.0); 597 597 explosionParticles->setRadius(.5, 6.0); … … 600 600 explosionParticles->setColor(0.1, 1,1,0,.9); 601 601 explosionParticles->setColor(0.5, .8,.4,0,.5); 602 explosionParticles->setColor(1.0, .2,.2,.2,. 0);603 604 605 emitter = new DotEmitter( 200 , 200, M_2_PI);606 emitter->setSpread( 0, M_2_PI);607 emitter->setEmissionRate( 400.0);602 explosionParticles->setColor(1.0, .2,.2,.2,.5); 603 604 605 emitter = new DotEmitter( 2000, 70, 360); 606 //emitter->setSpread( 0, M_2_PI); 607 emitter->setEmissionRate( 200.0); 608 608 //emitter->setEmissionVelocity( 200.0); 609 emitter->setSystem( explosionParticles);610 emitter->setAbsCoor( this->getAbsCoor());611 612 node = new EmitterNode( 1);609 //emitter->setSystem( explosionParticles); 610 //emitter->setAbsCoor( this->getAbsCoor()); 611 612 node = new EmitterNode( .1f); 613 613 node->setupParticle( emitter, explosionParticles); 614 node->setVelocity( this->getParent()->getVelocity()); 614 node->setAbsDir( this->getAbsDir()); 615 node->setVelocity( this->getVelocity() * .9f); 615 616 node->setAbsCoor( this->getAbsCoor()); 616 node->start(); 617 if( !node->start()) 618 PRINTF(0)("Explosion node not correctly started!"); 619 617 620 /* 618 621 PNode* node = new PNode(); … … 621 624 explosion->explode( node, Vector(5,5,5)); 622 625 */ 623 this->setAbsCoor(Vector(-10000,10000,10000)); 624 //this->hide(); 625 626 this->toList( OM_DEAD); 627 PRINTF(0)("spaceship destroy == ship translated \n"); 626 627 if( this->hasPlayer()) 628 { 629 this->setAbsCoor(Vector(-10000,10000,10000)); 630 this->hide(); 631 } 632 else 633 { 634 this->setAbsCoor( this->getAbsCoor() + Vector(150,0,0) + Vector(1,0,0) * VECTOR_RAND(50).dot(Vector(1,0,0))); 635 } 636 628 637 } 629 638 630 639 void SpaceShip::respawn( ) 631 640 { 632 //this->unhide();641 this->unhide(); 633 642 /*for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++) 634 643 {
Note: See TracChangeset
for help on using the changeset viewer.