Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | List of all members
LightStruct Class Reference

Public Member Functions

void FindLightComponents (Part part, bool disableColorPicker)
 Find the components needed for the light to function correctly. More...
 
void FixedUpdateLightsStatus (bool isOn, float time, float fdt, float resourceFraction, float targetLight, float currentLight, float lightBrightenSpeed, float lightDimSpeed, bool castLight, Color lightColor)
 Set the lights on and off in the FixedUpdate function of the part that contains this light. More...
 
 LightStruct ()
 
 LightStruct (string lightName, float lightR, float lightG, float lightB, string flareRendererName)
 
void Load (ConfigNode node)
 
void UpdateLightStatusOnEditor (bool isOn, Color lightColor)
 Set the lights on and off outside of the FixedUpdate function of the part that contains this light. More...
 

Public Attributes

string flareRendererName = "Flare"
 This is the Name of the flare transform. If not specified, it means the light has no flare. More...
 
float lightB
 This is the value Blue of the light More...
 
float lightG
 This is the value Green of the light More...
 
string lightName
 This is the Name of the light More...
 
float lightR
 This is the value Red of the light More...
 
Transform lightTransform
 This is the transform of the light More...
 

Constructor & Destructor Documentation

LightStruct.LightStruct ( )
inline
LightStruct.LightStruct ( string  lightName,
float  lightR,
float  lightG,
float  lightB,
string  flareRendererName 
)
inline

Member Function Documentation

void LightStruct.FindLightComponents ( Part  part,
bool  disableColorPicker 
)
inline

Find the components needed for the light to function correctly.

Parameters
partThe part that contains this light
void LightStruct.FixedUpdateLightsStatus ( bool  isOn,
float  time,
float  fdt,
float  resourceFraction,
float  targetLight,
float  currentLight,
float  lightBrightenSpeed,
float  lightDimSpeed,
bool  castLight,
Color  lightColor 
)
inline

Set the lights on and off in the FixedUpdate function of the part that contains this light.

Parameters
isOnThe state of the light, true = on, false = off
timeThe current time
fdtThe fixed time
resourceFractionThe resources left
targetLightThe target intensity of the light
currentLightThe current intensity of the light
lightBrightenSpeedThe speed the light increases intensity before reaching the target intensity
lightDimSpeedThe speed the light increases intensity when we reach the target intensity
castLightAre we casting light?, true = on, false = off
void LightStruct.Load ( ConfigNode  node)
inline
void LightStruct.UpdateLightStatusOnEditor ( bool  isOn,
Color  lightColor 
)
inline

Set the lights on and off outside of the FixedUpdate function of the part that contains this light.

Parameters
isOnThe state of the light, true = on, false = off

Member Data Documentation

string LightStruct.flareRendererName = "Flare"

This is the Name of the flare transform. If not specified, it means the light has no flare.

float LightStruct.lightB

This is the value Blue of the light

float LightStruct.lightG

This is the value Green of the light

string LightStruct.lightName

This is the Name of the light

float LightStruct.lightR

This is the value Red of the light

Transform LightStruct.lightTransform

This is the transform of the light


The documentation for this class was generated from the following file: