Class MyLightingLogic
Inheritance
System.Object
MyLightingLogic
Assembly: Sandbox.Game.dll
Syntax
public class MyLightingLogic : Object
Constructors
MyLightingLogic(MyFunctionalBlock, MyHeatVentBlockDefinition, IMyLightingLogicSync)
Declaration
public MyLightingLogic(MyFunctionalBlock block, MyHeatVentBlockDefinition blockDefinition, IMyLightingLogicSync sync)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.Entities.Cube.MyFunctionalBlock |
block |
|
| MyHeatVentBlockDefinition |
blockDefinition |
|
| Sandbox.Game.Entities.Interfaces.IMyLightingLogicSync |
sync |
|
MyLightingLogic(MyFunctionalBlock, MyLightingBlockDefinition, IMyLightingLogicSync)
Declaration
public MyLightingLogic(MyFunctionalBlock block, MyLightingBlockDefinition blockDefinition, IMyLightingLogicSync sync)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.Entities.Cube.MyFunctionalBlock |
block |
|
| MyLightingBlockDefinition |
blockDefinition |
|
| Sandbox.Game.Entities.Interfaces.IMyLightingLogicSync |
sync |
|
MyLightingLogic(MyFunctionalBlock, MySearchlightDefinition, IMyLightingLogicSync)
Declaration
public MyLightingLogic(MyFunctionalBlock block, MySearchlightDefinition blockDefinition, IMyLightingLogicSync sync)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.Entities.Cube.MyFunctionalBlock |
block |
|
| MySearchlightDefinition |
blockDefinition |
|
| Sandbox.Game.Entities.Interfaces.IMyLightingLogicSync |
sync |
|
MyLightingLogic(MyFunctionalBlock, IMyLightingComponentDefinition, IMyLightingLogicSync)
Declaration
public MyLightingLogic(MyFunctionalBlock block, IMyLightingComponentDefinition lightingComponentDefinition, IMyLightingLogicSync sync)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.Entities.Cube.MyFunctionalBlock |
block |
|
| IMyLightingComponentDefinition |
lightingComponentDefinition |
|
| Sandbox.Game.Entities.Interfaces.IMyLightingLogicSync |
sync |
|
Properties
BlinkIntervalSeconds
Declaration
public float BlinkIntervalSeconds { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
BlinkIntervalSecondsBounds
Declaration
public MyBounds BlinkIntervalSecondsBounds { get; }
Property Value
BlinkLength
Declaration
public float BlinkLength { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
BlinkLengthBounds
Declaration
public MyBounds BlinkLengthBounds { get; }
Property Value
BlinkOffset
Declaration
public float BlinkOffset { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
BlinkOffsetBounds
Declaration
public MyBounds BlinkOffsetBounds { get; }
Property Value
BulbColor
Declaration
public Color BulbColor { get; set; }
Property Value
Color
Declaration
public Color Color { get; set; }
Property Value
CurrentLightPower
Declaration
public float CurrentLightPower { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
Falloff
Declaration
public virtual float Falloff { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
FalloffBounds
Declaration
public MyBounds FalloffBounds { get; }
Property Value
HasSubPartLights
Declaration
public bool HasSubPartLights { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Intensity
Declaration
public float Intensity { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
IntensityBounds
Declaration
public MyBounds IntensityBounds { get; }
Property Value
IsEmissiveMaterialDirty
Declaration
public bool IsEmissiveMaterialDirty { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsPositionDirty
Declaration
public bool IsPositionDirty { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsPreview
Declaration
public bool IsPreview { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsReflector
Declaration
public bool IsReflector { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
LightLocalDatas
Declaration
public List<MyLightingLogic.LightLocalData> LightLocalDatas { get; }
Property Value
Lights
Declaration
public List<MyLight> Lights { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<MyLight> |
|
NeedPerFrameUpdate
Declaration
public bool NeedPerFrameUpdate { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
NeedsRecreateLights
Declaration
public bool NeedsRecreateLights { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Offset
Declaration
public float Offset { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
OffsetBounds
Declaration
public MyBounds OffsetBounds { get; }
Property Value
Radius
Declaration
public float Radius { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
RadiusBounds
Declaration
public MyBounds RadiusBounds { get; }
Property Value
ReflectorConeDegrees
Declaration
public float ReflectorConeDegrees { get; }
Property Value
| Type |
Description |
| System.Single |
|
ReflectorRadius
Declaration
public float ReflectorRadius { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
ReflectorRadiusBounds
Declaration
public MyBounds ReflectorRadiusBounds { get; }
Property Value
Methods
CloseLights()
Declaration
public void CloseLights()
ComputeBulbColor()
Declaration
public Color ComputeBulbColor()
Returns
CreateLights()
Declaration
public void CreateLights()
Initialize()
This method must be called in the block's Init() after base.Init() to ensure proper initialization order.
Declaration
OnAddedToScene()
Declaration
public void OnAddedToScene()
OnModelChange()
Declaration
public void OnModelChange()
RecreateLights()
Declaration
public void RecreateLights()
UpdateAfterSimulation()
Declaration
public void UpdateAfterSimulation()
UpdateAfterSimulation(Vector3, MatrixD)
Declaration
public void UpdateAfterSimulation(Vector3 lightPosition, MatrixD lightRotation)
Parameters
UpdateEmissiveMaterial()
Declaration
public void UpdateEmissiveMaterial()
UpdateEnabled()
Declaration
public void UpdateEnabled()
UpdateLightBlink()
Declaration
public void UpdateLightBlink()
UpdateLightData()
Declaration
public void UpdateLightData()
UpdateLightPosition()
Declaration
public void UpdateLightPosition()
UpdateLightPosition(Vector3, MatrixD)
Declaration
public void UpdateLightPosition(Vector3 lightPosition, MatrixD lightRotation)
Parameters
UpdateLightProperties()
Declaration
public void UpdateLightProperties()
UpdateOnceBeforeFrame()
Declaration
public void UpdateOnceBeforeFrame()
UpdateParents()
Declaration
public void UpdateParents()
UpdateVisual()
Declaration
public void UpdateVisual()
Events
OnEmissivityUpdated
Declaration
public event Action<bool> OnEmissivityUpdated
Event Type
| Type |
Description |
| System.Action<System.Boolean> |
|
OnInitLight
Declaration
public event Action<MyLight, Vector4, float, float> OnInitLight
Event Type
| Type |
Description |
| System.Action<MyLight, Vector4, System.Single, System.Single> |
|
OnIntensityUpdated
Declaration
public event Action OnIntensityUpdated
Event Type
| Type |
Description |
| System.Action |
|
OnPropertiesChanged
Declaration
public event Action OnPropertiesChanged
Event Type
| Type |
Description |
| System.Action |
|
OnRadiusUpdated
Declaration
public event Action<float> OnRadiusUpdated
Event Type
| Type |
Description |
| System.Action<System.Single> |
|
OnUpdateEnabled
Declaration
public event Action<bool> OnUpdateEnabled
Event Type
| Type |
Description |
| System.Action<System.Boolean> |
|