Changeset 10731 for code/branches/AI_HS15/src/orxonox/worldentities/pawns
- Timestamp:
- Oct 31, 2015, 4:07:29 PM (9 years ago)
- Location:
- code/branches/AI_HS15/src/orxonox/worldentities/pawns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/worldentities/pawns/Pawn.cc
r10725 r10731 320 320 } 321 321 322 322 323 void Pawn::death() 323 324 { … … 325 326 if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_)) 326 327 { 327 // Set bAlive_ to false and wait for destroyLater()to do the destruction328 // Set bAlive_ to false and wait for PawnManager to do the destruction 328 329 this->bAlive_ = false; 329 this->destroyLater();330 330 331 331 this->setDestroyWhenPlayerLeft(false); … … 367 367 if (GameMode::isMaster()) 368 368 { 369 this->deatheffect();369 // this->deathEffect(); 370 370 this->goWithStyle(); 371 371 } … … 387 387 { 388 388 // play death effect 389 /*{389 { 390 390 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 391 391 effect->setPosition(this->getPosition()); … … 410 410 effect->setSource("Orxonox/sparks"); 411 411 effect->setLifetime(4.0f); 412 }*/ 413 414 415 { 416 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 417 effect->setPosition(this->getPosition()); 418 effect->setOrientation(this->getOrientation()); 419 effect->setDestroyAfterLife(true); 420 effect->setSource("orxonox/explosion_flash2"); 421 effect->setLifetime(5.0f); 422 } 423 { 424 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 425 effect->setPosition(this->getPosition()); 426 effect->setOrientation(this->getOrientation()); 427 effect->setDestroyAfterLife(true); 428 effect->setSource("orxonox/explosion_flame2"); 429 effect->setLifetime(5.0f); 430 } 431 { 432 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 433 effect->setPosition(this->getPosition()); 434 effect->setOrientation(this->getOrientation()); 435 effect->setDestroyAfterLife(true); 436 effect->setSource("orxonox/explosion_shockwave2"); 437 effect->scale(20); 438 effect->setLifetime(5.0f); 439 }{ 440 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 441 effect->setPosition(this->getPosition()); 442 effect->setOrientation(this->getOrientation()); 443 effect->setDestroyAfterLife(true); 444 effect->setSource("orxonox/explosion_sparks2"); 445 effect->setLifetime(5.0f); 446 } 447 { 448 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 449 effect->setPosition(this->getPosition()); 450 effect->setOrientation(this->getOrientation()); 451 effect->setDestroyAfterLife(true); 452 effect->setSource("orxonox/explosion_streak2"); 453 effect->setLifetime(5.0f); 454 } 455 { 456 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 457 effect->setPosition(this->getPosition()); 458 effect->setOrientation(this->getOrientation()); 459 effect->setDestroyAfterLife(true); 460 effect->setSource("orxonox/explosion_afterglow"); 461 effect->scale(20); 462 effect->setLifetime(5.0f); 463 } 464 465 412 } 466 413 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i) 467 414 { -
code/branches/AI_HS15/src/orxonox/worldentities/pawns/Pawn.h
r10437 r10731 39 39 40 40 namespace orxonox // tolua_export 41 { 42 /** 43 @brief 44 Everything in Orxonoy that has a health attribute is a Pawn. After a Pawn is spawned its health is set to 45 its initial health. In every call of the Pawns tick function the game checks whether the pawns health is at 46 or below zero. If it is, the pawn gets killed. 47 48 Pawns can carry pickups and fire weapons. The can also have shields. 49 50 Notice that every Pawn is a ControllableEntity. 51 */ 52 53 // tolua_export 41 { // tolua_export 54 42 class _OrxonoxExport Pawn // tolua_export 55 43 : public ControllableEntity, public RadarViewable, public PickupCarrier
Note: See TracChangeset
for help on using the changeset viewer.