Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
962 B

  1. #ifndef _INCLUDED_C_ENV_AMBIENT_LIGHT_H
  2. #define _INCLUDED_C_ENV_AMBIENT_LIGHT_H
  3. #include "c_spatialentity.h"
  4. //------------------------------------------------------------------------------
  5. // Purpose : Ambient light controller entity with radial falloff
  6. //------------------------------------------------------------------------------
  7. class C_EnvAmbientLight : public C_SpatialEntityTemplate<Vector>
  8. {
  9. public:
  10. DECLARE_CLASS( C_EnvAmbientLight, C_SpatialEntityTemplate<Vector> );
  11. DECLARE_CLIENTCLASS();
  12. virtual void ApplyAccumulation( void );
  13. virtual void ClientThink( void );
  14. void SetColor( const Vector &vecColor, float flLerpTime = 0 );
  15. Vector GetTargetColor() { return m_vecTargetColor * 255.0f; }
  16. protected:
  17. virtual void AddToPersonalSpatialEntityMgr( void );
  18. virtual void RemoveFromPersonalSpatialEntityMgr( void );
  19. Vector m_vecStartColor;
  20. Vector m_vecTargetColor;
  21. CountdownTimer m_colorTimer;
  22. };
  23. #endif // _INCLUDED_C_ENV_AMBIENT_LIGHT_H