ExplosionParams.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////////////
00002 //    Scorched3D (c) 2000-2009
00003 //
00004 //    This file is part of Scorched3D.
00005 //
00006 //    Scorched3D is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    Scorched3D is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with Scorched3D; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ////////////////////////////////////////////////////////////////////////////////
00020 
00021 #if !defined(__INCLUDE_ExplosionParamsh_INCLUDE__)
00022 #define __INCLUDE_ExplosionParamsh_INCLUDE__
00023 
00024 #include <common/FixedVector.h>
00025 
00026 struct lua_State;
00027 class XMLNode;
00028 class ExplosionParams
00029 {
00030 public:
00031         enum DeformType
00032         {
00033                 DeformNone = 0,
00034                 DeformDown = 1,
00035                 DeformUp = 2,
00036         };
00037 
00038         ExplosionParams();
00039         ~ExplosionParams();
00040 
00041         bool parseXML(XMLNode *accessoryNode);
00042         void parseLUA(lua_State *L, int position);
00043 
00044         void setSize(fixed size) { size_ = size; }
00045         void setShake(fixed shake) { shake_ = shake; }
00046         void setMinLife(fixed minLife) { minLife_ = minLife; }
00047         void setMaxLife(fixed maxLife) { maxLife_ = maxLife; }
00048         void setHurtAmount(fixed amount) { hurtAmount_ = amount; }
00049         void setCreateMushroomAmount(fixed amount) { createMushroomAmount_ = amount; }
00050 
00051         const char *getExplosionTexture();
00052         const char *getExplosionSound();
00053         FixedVector &getExplosionColor();
00054 
00055         fixed getSize() { return size_; }
00056         fixed getMaxLife() { return maxLife_; }
00057         fixed getMinLife() { return minLife_; }
00058         fixed getHurtAmount() { return hurtAmount_; }
00059         fixed getShake() { return shake_; }
00060         fixed getCreateMushroomAmount() { return createMushroomAmount_; }
00061 
00062         DeformType getDeformType() { return deform_; }
00063         bool getCreateDebris() { return createDebris_; }
00064         bool getCreateSplash() { return createSplash_; }
00065         bool getWindAffected() { return windAffected_; }
00066         bool getOnlyHurtShield() { return onlyHurtShield_; }
00067         bool getLuminance() { return luminance_; }
00068         bool getAnimate() { return animate_; }
00069         bool getExplodeUnderGround() { return explodeUnderGround_; }
00070         
00071         const char *getDeformTexture() { return deformTexture_.c_str(); }
00072 
00073 protected:
00074         fixed size_;
00075         fixed hurtAmount_;
00076         fixed shake_;
00077         fixed minLife_, maxLife_;
00078         fixed createMushroomAmount_;
00079         bool luminance_;
00080         bool windAffected_;
00081         bool multiColored_;
00082         bool createDebris_;
00083         bool createSplash_;
00084         bool explodeUnderGround_;
00085         bool onlyHurtShield_;
00086         bool animate_;
00087         
00088         std::string deformTexture_;
00089         std::string explosionTexture_;
00090         std::string explosionSound_;
00091         DeformType deform_;
00092         
00093 };
00094 
00095 #endif

Generated on Mon Feb 16 15:14:48 2009 for Scorched3D by  doxygen 1.5.3