Class ActivationDelta
Represents a collection of activation (on/off) changes for procedural animation. Analogous to TransformDelta but for boolean GameObject activation instead of scale.
Why TransformId: this deliberately reuses TransformId as the dictionary key rather than introducing a new value-object type. An activation target is still just a named target within this animator's world — the same identifier space transform targets already use — so a distinct id type would only duplicate TransformId's shape for no additional type safety.
Combination Semantics: Uses last-write-wins per TransformId. When combining two ActivationDeltas, entries from the other delta overwrite existing entries with the same TransformId. This is deterministic given consistent ordering.
Inherited Members
Namespace: Serenity.ProceduralAnimator.Domain.Entities
Assembly: Serenity.ProceduralAnimator.Domain.dll
Syntax
public class ActivationDelta
Constructors
ActivationDelta()
Creates an empty ActivationDelta with no entries.
Declaration
public ActivationDelta()
Properties
Count
Gets the number of entries in this delta.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
IsEmpty
Checks if this delta has any entries.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
Clear()
Clears all activation entries.
Declaration
public void Clear()
Clone()
Creates a deep copy of this ActivationDelta.
Declaration
public ActivationDelta Clone()
Returns
| Type | Description |
|---|---|
| ActivationDelta | A new ActivationDelta with the same entries. |
Combine(ActivationDelta)
Combines another ActivationDelta into this one using last-write-wins semantics. Entries from the other delta overwrite existing entries with the same TransformId.
Declaration
public void Combine(ActivationDelta other)
Parameters
| Type | Name | Description |
|---|---|---|
| ActivationDelta | other | The ActivationDelta to merge into this one. |
GetEntries()
Gets all activation entries for applier access.
Declaration
public IReadOnlyDictionary<TransformId, bool> GetEntries()
Returns
| Type | Description |
|---|---|
| IReadOnlyDictionary<TransformId, bool> | Read-only dictionary of TransformId to desired active state. |
SetActive(TransformId, bool)
Sets the desired active state for an activation target. If an entry already exists for this TransformId, it is overwritten.
Declaration
public void SetActive(TransformId id, bool active)
Parameters
| Type | Name | Description |
|---|---|---|
| TransformId | id | The activation target identifier. |
| bool | active | Whether the target should be active. |