Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/explosionChunksHS15/src/orxonox/worldentities/ExplosionPart.h @ 10810

Last change on this file since 10810 was 10810, checked in by vaydin, 9 years ago

added offset option for explosion

File size: 2.6 KB
Line 
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"
43#include "tools/Timer.h"
44
45
46 namespace orxonox
47{
48    class _OrxonoxExport ExplosionPart : public MovableEntity
49    {
50        public:
51            ExplosionPart(Context* context);
52            ~ExplosionPart();
53            void XMLPort(Element& xmlelement, XMLPort::Mode mode);
54            void Explode();
55            void stop();
56
57            void setMesh(const std::string& newString);
58            std::string& getMesh();
59            void setEffect1(const std::string& newString);
60            std::string& getEffect1();
61            void setEffect2(const std::string& newString);
62            std::string& getEffect2();
63            void setMinSpeed(float speed);
64            float getMinSpeed();
65            void setMaxSpeed(float speed);
66            float getMaxSpeed();
67            void setOffset(Vector3 newVector);
68            Vector3 getOffset();
69         
70
71        private:
72
73            bool bStop_;
74            LODParticle::Value LOD_;
75
76
77                Model* model_;
78                ParticleInterface* effect1Particle_;
79            ParticleInterface* effect2Particle_;
80
81
82            float minSpeed_;
83            float maxSpeed_;
84                std::string mesh_;
85                std::string effect1_;
86            std::string effect2_;
87            Vector3 posOffset_;
88
89            MovableEntity* explosionEntity_;
90
91            Timer destroyTimer_;
92
93               
94
95    };
96}
97
98#endif /* _ExplosionPart_H__ */
Note: See TracBrowser for help on using the repository browser.