Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 16, 2015, 2:44:09 PM (8 years ago)
Author:
vaydin
Message:

added explosioneffects to the xml files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc

    r10786 r10807  
    374374            if (GameMode::isMaster())
    375375            {
    376                 //this->deatheffect();
    377376                this->goWithStyle();
    378377            }
     
    395394        }
    396395
     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
    397402        this->explosionSound_->setPosition(this->getPosition());
    398403        this->explosionSound_->play();
    399404    }
    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   
    488406    void Pawn::fired(unsigned int firemode)
    489407    {
Note: See TracChangeset for help on using the changeset viewer.