- Timestamp:
- Dec 7, 2015, 3:32:07 PM (9 years ago)
- Location:
- code/branches/explosionChunksHS15/src/orxonox/worldentities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/explosionChunksHS15/src/orxonox/worldentities/CMakeLists.txt
r10752 r10937 6 6 ControllableEntity.cc 7 7 Drone.cc 8 BigExplosion.cc9 8 EffectContainer.cc 10 9 ExplosionChunk.cc -
code/branches/explosionChunksHS15/src/orxonox/worldentities/ExplosionPart.cc
r10837 r10937 26 26 * 27 27 */ 28 28 29 29 30 … … 86 87 XMLPortParam(ExplosionPart, "direction", setDirection, getDirection, xmlelement, mode).defaultValues(Vector3(1,1,1)); 87 88 XMLPortParam(ExplosionPart, "angle", setAngle, getAngle, xmlelement, mode).defaultValues(180); 88 XMLPortParam(ExplosionPart, "size", setSize, getSize, xmlelement, mode).defaultValues(4);89 89 XMLPortParam(ExplosionPart, "delay", setDelay, getDelay, xmlelement, mode).defaultValues(0); 90 90 } … … 120 120 //this->model_->setSyncMode(0); 121 121 122 122 123 if(effect1_ != "") 123 124 { 124 125 this->effect1Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect1_, this->LOD_); 126 this->effect1Particle_->setDimensions(this->getScale()); 125 127 this->model_->attachOgreObject(this->effect1Particle_->getParticleSystem()); 126 128 } … … 129 131 { 130 132 this->effect2Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect2_, this->LOD_); 133 this->effect2Particle_->setDimensions(this->getScale()); 131 134 this->model_->attachOgreObject(this->effect2Particle_->getParticleSystem()); 132 135 } 136 137 133 138 134 139 … … 144 149 this->explosionEntity_->setVelocity(finalDirection*rnd(minSpeed_,maxSpeed_)); 145 150 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 147 153 148 154 this->explosionEntity_->attach(model_); 155 149 156 150 157 this->attach(explosionEntity_); … … 192 199 { 193 200 this->posOffset_ = newVector; 194 this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_ );201 this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_ / this->getScale()); 195 202 } 196 203 … … 203 210 { 204 211 this->angle_ = newAngle; 205 }206 207 void ExplosionPart::setSize(float newSize)208 {209 this->size_ = newSize;210 212 } 211 213 … … 249 251 } 250 252 251 float ExplosionPart::getSize()252 {253 return size_;254 }255 256 253 float ExplosionPart::getDelay() 257 254 { -
code/branches/explosionChunksHS15/src/orxonox/worldentities/ExplosionPart.h
r10837 r10937 72 72 void setAngle(float newAgnle); 73 73 float getAngle(); 74 void setSize(float newSize);75 float getSize();76 74 void setDelay(float newDelay); 77 75 float getDelay(); … … 97 95 Vector3 direction_; 98 96 float angle_; 99 float size_;100 97 float delay_; 101 98 -
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10837 r10937 41 41 #include "graphics/ParticleSpawner.h" 42 42 #include "worldentities/ExplosionChunk.h" 43 #include "worldentities/BigExplosion.h"44 43 #include "worldentities/ExplosionPart.h" 45 44 #include "weaponsystem/WeaponSystem.h" … … 380 379 void Pawn::goWithStyle() 381 380 { 382 orxout() << "gowithstyle" << endl;383 384 381 385 382 this->bAlive_ = false;
Note: See TracChangeset
for help on using the changeset viewer.