Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2017, 3:28:41 PM (6 years ago)
Author:
varxth
Message:

fireball with particle spawner

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc

    r11597 r11599  
    4242#include "util/Output.h"
    4343#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
     44#include "graphics/ParticleSpawner.h"
     45
    4446
    4547
     
    5860        this->enableCollisionCallback();
    5961        gravityAcceleration_ = 350.0;
     62
    6063        speed_ = 0;
    6164        hasCollided_=false;
     
    6871        collDisZ_ = 0;
    6972        hitCounter_ = 0;
    70        
     73        particlespawner_ = NULL ;
     74
     75
     76
     77   
     78
    7179    }
    7280
     
    147155        SUPER(SOBFireball, tick, dt);
    148156
     157        //the particle spawner that generates the fire from the backpack when pressed
     158        if (particlespawner_ == NULL) {
     159            for (WorldEntity* object : this->getAttachedObjects())
     160            {
     161               if (object->isA(Class(ParticleSpawner)))
     162                particlespawner_ = object;
     163            }
     164
     165        }
     166
     167        if(particlespawner_ != NULL)
     168            particlespawner_->setVisible(true);
    149169        if (!changeAllowed_) {
    150170            changedOn_+= dt;
Note: See TracChangeset for help on using the changeset viewer.