[10752] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Vedat Aydin |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #ifndef _ExplosionPart_H__ |
---|
| 30 | #define _ExplosionPart_H__ |
---|
| 31 | |
---|
| 32 | #include "OrxonoxPrereqs.h" |
---|
| 33 | |
---|
| 34 | #include "graphics/Model.h" |
---|
| 35 | #include "tools/ParticleInterface.h" |
---|
| 36 | #include "MovableEntity.h" |
---|
| 37 | #include "graphics/ParticleSpawner.h" |
---|
| 38 | #include "core/CoreIncludes.h" |
---|
| 39 | #include "core/GameMode.h" |
---|
| 40 | #include "util/Exception.h" |
---|
| 41 | #include "core/command/Executor.h" |
---|
| 42 | #include "Scene.h" |
---|
[10786] | 43 | #include "tools/Timer.h" |
---|
[10752] | 44 | |
---|
| 45 | |
---|
| 46 | namespace orxonox |
---|
| 47 | { |
---|
| 48 | class _OrxonoxExport ExplosionPart : public MovableEntity |
---|
| 49 | { |
---|
| 50 | public: |
---|
| 51 | ExplosionPart(Context* context); |
---|
[10786] | 52 | ~ExplosionPart(); |
---|
[10752] | 53 | void XMLPort(Element& xmlelement, XMLPort::Mode mode); |
---|
| 54 | void Explode(); |
---|
[10786] | 55 | void stop(); |
---|
[10837] | 56 | void ActuallyExplode(); |
---|
[10752] | 57 | |
---|
| 58 | void setMesh(const std::string& newString); |
---|
| 59 | std::string& getMesh(); |
---|
[10786] | 60 | void setEffect1(const std::string& newString); |
---|
| 61 | std::string& getEffect1(); |
---|
| 62 | void setEffect2(const std::string& newString); |
---|
| 63 | std::string& getEffect2(); |
---|
| 64 | void setMinSpeed(float speed); |
---|
| 65 | float getMinSpeed(); |
---|
| 66 | void setMaxSpeed(float speed); |
---|
| 67 | float getMaxSpeed(); |
---|
[10810] | 68 | void setOffset(Vector3 newVector); |
---|
| 69 | Vector3 getOffset(); |
---|
[10837] | 70 | void setDirection(Vector3 newDirection); |
---|
| 71 | Vector3 getDirection(); |
---|
| 72 | void setAngle(float newAgnle); |
---|
| 73 | float getAngle(); |
---|
| 74 | void setSize(float newSize); |
---|
| 75 | float getSize(); |
---|
| 76 | void setDelay(float newDelay); |
---|
| 77 | float getDelay(); |
---|
[10752] | 78 | |
---|
| 79 | |
---|
| 80 | private: |
---|
| 81 | |
---|
| 82 | bool bStop_; |
---|
| 83 | LODParticle::Value LOD_; |
---|
| 84 | |
---|
| 85 | |
---|
| 86 | Model* model_; |
---|
[10786] | 87 | ParticleInterface* effect1Particle_; |
---|
| 88 | ParticleInterface* effect2Particle_; |
---|
[10752] | 89 | |
---|
[10786] | 90 | |
---|
| 91 | float minSpeed_; |
---|
| 92 | float maxSpeed_; |
---|
[10752] | 93 | std::string mesh_; |
---|
[10786] | 94 | std::string effect1_; |
---|
| 95 | std::string effect2_; |
---|
[10810] | 96 | Vector3 posOffset_; |
---|
[10837] | 97 | Vector3 direction_; |
---|
| 98 | float angle_; |
---|
| 99 | float size_; |
---|
| 100 | float delay_; |
---|
[10752] | 101 | |
---|
| 102 | MovableEntity* explosionEntity_; |
---|
| 103 | |
---|
[10786] | 104 | Timer destroyTimer_; |
---|
| 105 | |
---|
[10752] | 106 | |
---|
| 107 | |
---|
| 108 | }; |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | #endif /* _ExplosionPart_H__ */ |
---|