MercuryParticle.h

Go to the documentation of this file.
00001 #ifndef MERCURYPARTICLE_H
00002 #define MERCURYPARTICLE_H
00003 
00004 #include "MercuryObject.h"
00005 #include "MercurySprite.h"
00006 
00010 class MercuryParticleField : public MercuryObject
00011 {
00012 public:
00013     MercuryParticleField() : MercuryObject(), m_origional(NULL) {}
00014     virtual ~MercuryParticleField() { SAFE_DELETE(m_origional); }
00015 
00016     virtual void Message( int Message, PStack & data, const MString & name );
00017     inline unsigned int GetPointSize() const { return m_pointsize; }
00018     MercuryObject* SpawnParticle();
00019 
00020     virtual void Init();
00021     virtual void Update( const float dTime );
00022     virtual void CustomRender();
00023 
00024     void LoadImage(MString path);
00025 
00026     inline void ToggleDestroyOnEmpty(bool toggle) { m_destroyOnEmpty = toggle; }
00027 
00028     CLASS_RTTI( MercuryParticleField, MercuryObject );
00029 private:
00030 
00031     MercuryMaterial m_material;
00032     int m_pointsize;
00033     MString m_imagePath;
00034     MercurySprite* m_origional;
00035     bool m_destroyOnEmpty;
00036 };
00037 
00038 #endif
00039 
00040 /* 
00041  * Copyright (c) 2006, Joshua Allen
00042  * All rights reserved.
00043  *
00044  * Redistribution and use in source and binary forms, with or
00045  * without modification, are permitted provided that the following
00046  * conditions are met:
00047  *  -   Redistributions of source code must retain the above
00048  *      copyright notice, this list of conditions and the following disclaimer.
00049  *  -   Redistributions in binary form must reproduce the above copyright
00050  *      notice, this list of conditions and the following disclaimer in
00051  *      the documentation and/or other materials provided with the distribution.
00052  *  -   Neither the name of the Mercury Engine nor the names of its
00053  *      contributors may be used to endorse or promote products derived from
00054  *      this software without specific prior written permission.
00055  *
00056  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00057  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00058  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00059  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
00060  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00061  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00062  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00063  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00064  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00065  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00066  */

Hosted by SourceForge.net Logo