ExplodingCokeCan.h

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

Hosted by SourceForge.net Logo