#ifndef INCLUDED_EXPLOSION
#define INCLUDED_EXPLOSION

#include <Math/Vector.h>

#include <memory>

namespace Dubious {
namespace Renderer {
class Billboard;
class PngImage;
typedef std::shared_ptr<Billboard> BillboardPtr;
typedef std::shared_ptr<PngImage> PngImagePtr;
}
}
using namespace Dubious;

//////////////////////////////////////////////////////////////
class Explosion
{
public:
	Explosion( Renderer::PngImagePtr pImage0, Renderer::PngImagePtr pImage1, float Lifespan );
	~Explosion();

	void				Update( float Elapsed );

	Renderer::BillboardPtr Billboard() { return m_pBillboard; }
	bool				Expired() const { return m_TimeRemaining < 0; }

	void				SetPosition( const Math::Vector& P );

private:
	Explosion( const Explosion& );
	Explosion& operator=( const Explosion& );

	Renderer::BillboardPtr m_pBillboard;
	float				m_Lifespan;
	float				m_TimeRemaining;
};


#endif
