flarelight.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. class FlareLight extends PointLightBase
  2. {
  3. static float m_FlareRadius = 100;
  4. static float m_FlareBrightness = 10.0;
  5. static string m_MemoryPoint = "light";
  6. void FlareLight()
  7. {
  8. SetVisibleDuringDaylight( true );
  9. SetRadiusTo( m_FlareRadius );
  10. SetBrightnessTo( m_FlareBrightness );
  11. FadeIn( 1 );
  12. SetFadeOutTime( 0.2 );
  13. SetDiffuseColor( 0.7, 0.7, 0.3 );
  14. SetAmbientColor( 0.7, 0.7, 0.3 );
  15. SetFlareVisible( false );
  16. SetFlickerAmplitude( 0.9 );
  17. SetFlickerSpeed( 0.3 );
  18. SetDancingShadowsMovementSpeed( 0.5 );
  19. SetDancingShadowsAmplitude( 0.15 );
  20. //SetLifetime( 50 );
  21. EnableLinear( true );
  22. EnableHeatHaze( true );
  23. SetHeatHazeRadius( 0.1 );
  24. SetHeatHazePower( 0.02 );
  25. #ifdef PLATFORM_WINDOWS
  26. SetCastShadow( true );
  27. #else
  28. SetCastShadow( false );
  29. #endif
  30. }
  31. }
  32. class FlareLightRed extends FlareLight
  33. {
  34. void FlareLightRed()
  35. {
  36. SetDiffuseColor( 1.0, 0.3, 0.3 );
  37. SetAmbientColor( 1.0, 0.3, 0.3 );
  38. }
  39. }
  40. class FlareLightGreen extends FlareLight
  41. {
  42. void FlareLightGreen()
  43. {
  44. SetDiffuseColor( 0.3, 1.0, 0.3 );
  45. SetAmbientColor( 0.3, 1.0, 0.3 );
  46. }
  47. }
  48. class FlareLightBlue extends FlareLight
  49. {
  50. void FlareLightBlue()
  51. {
  52. SetDiffuseColor( 0.3, 0.3, 1.0 );
  53. SetAmbientColor( 0.3, 0.3, 1.0 );
  54. }
  55. }
  56. class FlareLightContamination extends FlareLightRed
  57. {
  58. void FlareLightContamination()
  59. {
  60. SetLifetime( 20 );
  61. }
  62. }