Class DirectionalLight2D
An directional light
public class DirectionalLight2D : Light, IIdentifier, ISerialization
- Inheritance
-
DirectionalLight2D
- Implements
- Inherited Members
Constructors
DirectionalLight2D()
Initializes a new instance of the DirectionalLight2D class.
public DirectionalLight2D()
DirectionalLight2D(Vector4, float)
Creates a new instance of the DirectionalLight2D class.
public DirectionalLight2D(Vector4 color, float intensity)
Parameters
Properties
HasShadowMap
Determines if the light has a shadow map.
public override bool HasShadowMap { get; }
Property Value
Methods
Deserialize(JObject, SerializationContext, Func<JObject, bool>)
Populates the object's properties from the specified JSON object using the provided serialization context.
public override void Deserialize(JObject obj, SerializationContext serializationContext, Func<JObject, bool> callback = null)
Parameters
objJObjectserializationContextSerializationContextThe context to use during deserialization, providing additional information or services required for the process.
callbackFunc<JObject, bool>
Dispose(IRenderDevice)
Releases all resources used by the object and performs any necessary cleanup using the specified render device.
public override void Dispose(IRenderDevice renderer)
Parameters
rendererIRenderDeviceThe render device to use for releasing graphics resources. Cannot be null.
Init(IRenderDevice)
Initializes the object using the specified render device.
public override void Init(IRenderDevice renderer)
Parameters
rendererIRenderDeviceThe render device to use for initialization. Cannot be null.
Serialize(JsonWriter, SerializationContext, Action<JsonWriter>)
Serializes the current object to a JSON representation suitable for storage or transmission.
public override void Serialize(JsonWriter writer, SerializationContext serializationContext, Action<JsonWriter> callback = null)
Parameters
writerJsonWriterserializationContextSerializationContextThe context that provides information and services required for serialization.
callbackAction<JsonWriter>