- Timestamp:
- Nov 16, 2015, 2:44:09 PM (9 years ago)
- Location:
- code/branches/explosionChunksHS15/src/orxonox/worldentities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/explosionChunksHS15/src/orxonox/worldentities/ExplosionPart.cc
r10786 r10807 120 120 if (GameMode::isMaster()) 121 121 { 122 this->destroyTimer_.setTimer(rnd(2, 3), false, createExecutor(createFunctor(&ExplosionPart::stop, this)));122 this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&ExplosionPart::stop, this))); 123 123 } 124 124 -
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10786 r10807 374 374 if (GameMode::isMaster()) 375 375 { 376 //this->deatheffect();377 376 this->goWithStyle(); 378 377 } … … 395 394 } 396 395 396 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i) 397 { 398 ExplosionChunk* chunk = new ExplosionChunk(this->getContext()); 399 chunk->setPosition(this->getPosition()); 400 } 401 397 402 this->explosionSound_->setPosition(this->getPosition()); 398 403 this->explosionSound_->play(); 399 404 } 400 void Pawn::deatheffect() 401 { 402 orxout() << "deatheffect" << endl; 403 // play death effect 404 /*{ 405 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 406 effect->setPosition(this->getPosition()); 407 effect->setOrientation(this->getOrientation()); 408 effect->setDestroyAfterLife(true); 409 effect->setSource("Orxonox/explosion2b"); 410 effect->setLifetime(4.0f); 411 } 412 { 413 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 414 effect->setPosition(this->getPosition()); 415 effect->setOrientation(this->getOrientation()); 416 effect->setDestroyAfterLife(true); 417 effect->setSource("Orxonox/smoke6"); 418 effect->setLifetime(4.0f); 419 } 420 { 421 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 422 effect->setPosition(this->getPosition()); 423 effect->setOrientation(this->getOrientation()); 424 effect->setDestroyAfterLife(true); 425 effect->setSource("Orxonox/sparks"); 426 effect->setLifetime(4.0f); 427 }*/ 428 429 430 { 431 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 432 effect->setPosition(this->getPosition()); 433 effect->setOrientation(this->getOrientation()); 434 effect->setDestroyAfterLife(true); 435 effect->setSource("orxonox/explosion_flash2"); 436 effect->setLifetime(5.0f); 437 } 438 { 439 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 440 effect->setPosition(this->getPosition()); 441 effect->setOrientation(this->getOrientation()); 442 effect->setDestroyAfterLife(true); 443 effect->setSource("orxonox/explosion_flame2"); 444 effect->setLifetime(5.0f); 445 } 446 { 447 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 448 effect->setPosition(this->getPosition()); 449 effect->setOrientation(this->getOrientation()); 450 effect->setDestroyAfterLife(true); 451 effect->setSource("orxonox/explosion_shockwave2"); 452 effect->scale(20); 453 effect->setLifetime(5.0f); 454 }{ 455 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 456 effect->setPosition(this->getPosition()); 457 effect->setOrientation(this->getOrientation()); 458 effect->setDestroyAfterLife(true); 459 effect->setSource("orxonox/explosion_sparks2"); 460 effect->setLifetime(5.0f); 461 } 462 { 463 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 464 effect->setPosition(this->getPosition()); 465 effect->setOrientation(this->getOrientation()); 466 effect->setDestroyAfterLife(true); 467 effect->setSource("orxonox/explosion_streak2"); 468 effect->setLifetime(5.0f); 469 } 470 { 471 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 472 effect->setPosition(this->getPosition()); 473 effect->setOrientation(this->getOrientation()); 474 effect->setDestroyAfterLife(true); 475 effect->setSource("orxonox/explosion_afterglow"); 476 effect->scale(20); 477 effect->setLifetime(5.0f); 478 } 479 480 481 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i) 482 { 483 ExplosionChunk* chunk = new ExplosionChunk(this->getContext()); 484 chunk->setPosition(this->getPosition()); 485 } 486 } 487 405 488 406 void Pawn::fired(unsigned int firemode) 489 407 { -
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.h
r10752 r10807 209 209 virtual Controller* getSlave(); 210 210 virtual void goWithStyle(); 211 virtual void deatheffect();212 211 virtual void spawneffect(); 213 212
Note: See TracChangeset
for help on using the changeset viewer.