Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2015, 3:32:07 PM (10 years ago)
Author:
vaydin
Message:

Finalized everything deleted now unnecessary BigExplosion

File:
1 edited

Legend:

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

    r10837 r10937  
    2626 *
    2727 */
     28
    2829
    2930
     
    8687                XMLPortParam(ExplosionPart, "direction", setDirection, getDirection, xmlelement, mode).defaultValues(Vector3(1,1,1));
    8788                XMLPortParam(ExplosionPart, "angle", setAngle, getAngle, xmlelement, mode).defaultValues(180);
    88                 XMLPortParam(ExplosionPart, "size", setSize, getSize, xmlelement, mode).defaultValues(4);
    8989                XMLPortParam(ExplosionPart, "delay", setDelay, getDelay, xmlelement, mode).defaultValues(0);
    9090        }
     
    120120                //this->model_->setSyncMode(0);
    121121
     122
    122123                if(effect1_ != "")
    123124                {
    124125                        this->effect1Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect1_, this->LOD_);
     126                        this->effect1Particle_->setDimensions(this->getScale());
    125127                        this->model_->attachOgreObject(this->effect1Particle_->getParticleSystem());
    126128                }
     
    129131                {
    130132                        this->effect2Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect2_, this->LOD_);
     133                        this->effect2Particle_->setDimensions(this->getScale());
    131134                        this->model_->attachOgreObject(this->effect2Particle_->getParticleSystem());
    132135                }
     136
     137
    133138
    134139               
     
    144149                this->explosionEntity_->setVelocity(finalDirection*rnd(minSpeed_,maxSpeed_));
    145150        this->explosionEntity_->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
    146         this->explosionEntity_->setScale(size_);
     151        this->explosionEntity_->setScale(this->getScale() * 4);
     152
    147153
    148154        this->explosionEntity_->attach(model_);
     155
    149156
    150157        this->attach(explosionEntity_);
     
    192199        {
    193200                this->posOffset_ = newVector;
    194                 this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_);
     201                this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_ / this->getScale());
    195202        }
    196203
     
    203210        {
    204211                this->angle_ = newAngle;
    205         }
    206 
    207         void ExplosionPart::setSize(float newSize)
    208         {
    209                 this->size_ = newSize;
    210212        }
    211213
     
    249251        }
    250252
    251         float ExplosionPart::getSize()
    252         {
    253                 return size_;
    254         }
    255 
    256253        float ExplosionPart::getDelay()
    257254        {
Note: See TracChangeset for help on using the changeset viewer.