Changeset 10810 for code/branches/explosionChunksHS15/src/orxonox
- Timestamp:
- Nov 16, 2015, 3:51:56 PM (9 years ago)
- Location:
- code/branches/explosionChunksHS15/src/orxonox/worldentities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/explosionChunksHS15/src/orxonox/worldentities/ExplosionPart.cc
r10807 r10810 49 49 this->effect2Particle_= NULL; 50 50 this->explosionEntity_ = new MovableEntity(this->getContext()); 51 this->posOffset_ = Vector3::ZERO; 51 52 52 53 … … 82 83 XMLPortParam(ExplosionPart, "effect1", setEffect1, getEffect1, xmlelement, mode).defaultValues(""); 83 84 XMLPortParam(ExplosionPart, "effect2", setEffect2, getEffect2, xmlelement, mode).defaultValues(""); 85 XMLPortParam(ExplosionPart, "offset", setOffset, getOffset, xmlelement, mode).defaultValues(Vector3::ZERO); 84 86 85 87 … … 90 92 { 91 93 orxout() << "Explode" << endl; 94 92 95 93 96 … … 174 177 } 175 178 179 void ExplosionPart::setOffset(Vector3 newVector) 180 { 181 this->posOffset_ = newVector; 182 this->setPosition(this->getPosition() + this->posOffset_); 183 } 184 176 185 std::string& ExplosionPart::getMesh() 177 186 { return this->mesh_; } … … 193 202 } 194 203 204 Vector3 ExplosionPart::getOffset() 205 { 206 return this->posOffset_; 207 } 208 195 209 196 210 -
code/branches/explosionChunksHS15/src/orxonox/worldentities/ExplosionPart.h
r10786 r10810 65 65 void setMaxSpeed(float speed); 66 66 float getMaxSpeed(); 67 void setOffset(Vector3 newVector); 68 Vector3 getOffset(); 67 69 68 70 … … 83 85 std::string effect1_; 84 86 std::string effect2_; 87 Vector3 posOffset_; 85 88 86 89 MovableEntity* explosionEntity_; -
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10807 r10810 140 140 XMLPortParam(Pawn, "spawnparticlesource", setSpawnParticleSource, getSpawnParticleSource, xmlelement, mode); 141 141 XMLPortParam(Pawn, "spawnparticleduration", setSpawnParticleDuration, getSpawnParticleDuration, xmlelement, mode).defaultValues(3.0f); 142 XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues( 7);142 XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues(0); 143 143 144 144 XMLPortObject(Pawn, WeaponSlot, "weaponslots", addWeaponSlot, getWeaponSlot, xmlelement, mode);
Note: See TracChangeset
for help on using the changeset viewer.