Class Light2DChunk
Represents an chunk of lights in the scene.
public class Light2DChunk : ISerialization
- Inheritance
-
Light2DChunk
- Implements
- Inherited Members
Constructors
Light2DChunk()
Initializes a new instance of the Light2DChunk class.
public Light2DChunk()
Remarks
This constructor creates an empty collection of PointLight2D objects, ready to be populated after instantiation.
Properties
Lights
Gets or sets the collection of 2D point lights used in the scene.
public List<PointLight2D> Lights { get; set; }
Property Value
Methods
Deserialize(JObject, SerializationContext, Func<JObject, bool>)
Populates the collection of point lights from the specified JSON object using the provided serialization context.
public void Deserialize(JObject obj, SerializationContext serializationContext, Func<JObject, bool> callback = null)
Parameters
objJObjectserializationContextSerializationContextThe SerializationContext to use during deserialization. Provides context or settings required for the operation.
callbackFunc<JObject, bool>
Remarks
This method clears the existing collection of point lights before adding the deserialized lights from the JSON object. Any existing lights will be removed.
Serialize(JsonWriter, SerializationContext, Action<JsonWriter>)
Serializes the current object and its child lights into a JSON representation.
public void Serialize(JsonWriter writer, SerializationContext serializationContext, Action<JsonWriter> callback = null)
Parameters
writerJsonWriterserializationContextSerializationContextThe context to use during serialization, which may provide settings or state required for the serialization process.
callbackAction<JsonWriter>