//////////////////////////////////////////////////////////////////////////////
//
// Asura_ClientEntity_DestructibleLight.h
//
// Copyright (c) 2006 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

// B E G I N   F I L E   W R A P P E R ///////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef ASURA_CLIENTENTITY_DESTRUCTIBLELIGHT_H___
#define ASURA_CLIENTENTITY_DESTRUCTIBLELIGHT_H___ 1

#ifndef ASURA_TARGET_SM3

// I N C L U D E S ///////////////////////////////////////////////////////////

// Engine independent.
#include "Core/Asura_Handle.h"
#include "Entity/PhysicalObject/Asura_ClientEntity_PhysicsObject.h"

// F O R W A R D   D E C L A R A T I O N S ///////////////////////////////////

class Asura_Message_DestructibleLight_ClientUpdate;
class Asura_Photon;

// C L A S S E S /////////////////////////////////////////////////////////////

class Asura_ClientEntity_DestructibleLight : public virtual Asura_ClientEntity_PhysicsObject
{

public:

    static Asura_ClientEntity_DestructibleLight* FindEntity( Asura_Guid uGUID );
    
    virtual bool HandleMessage( const Asura_Message* pxMsg );
    virtual void Update( void );

protected:

    Asura_ClientEntity_DestructibleLight();
    virtual ~Asura_ClientEntity_DestructibleLight();

    void UpdateCorona( const Asura_Message_DestructibleLight_ClientUpdate* pxMsgData );
    //updates the colour of photon and colour , taking colour values as used by Asura_Photon.
    //(ie 0 to 1 , with 0.5f being max normal brightness) RAR 20/05/03
    void SetPhotonAndCoronaColour(float fRed,float fGreen,float fBlue);

    Asura_Photon* m_pxPhoton;
    Asura_Handle m_iCoronaHandle;

private:

    friend class Tools_Entity_DestructibleLight;

    typedef Asura_ClientEntity_PhysicsObject PARENT;

    static Asura_Hashed_List<Asura_ClientEntity_DestructibleLight> s_xDestructibleLightList;

};

// E N D   F I L E   W R A P P E R ///////////////////////////////////////////

#endif // #ifndef ASURA_TARGET_SM3

#endif // #ifndef ASURA_CLIENTENTITY_DESTRUCTIBLELIGHT_H___
