Skip to content

AnimationCollection ​

Namespace: Hex1b.Animation

Assembly: Hex1b.dll

A named collection of animators. Provides create-or-retrieve semantics and bulk advance/dispose operations.

csharp
public sealed class AnimationCollection : IDisposable

Inheritance ​

Object → AnimationCollection

Implements ​

Methods ​

Dispose() ​

Disposes all animators and clears the collection.

csharp
public void Dispose()

Get<T>(string, Action<T>?, bool) ​

Gets or creates an animator by name. On first call, the configure action is invoked to set initial properties and the animator is optionally auto-started. On subsequent calls, the same animator instance is returned.

Parameters:

  • name (String): Unique name for this animator within the collection.
  • configure (Action<<T>>): Called once on creation to set Duration, Easing, From/To, etc.
  • autoStart (Boolean): If true, calls Start() after configure on creation. Default is true.

Returns: <T>

csharp
public T Get<T>(string name, Action<T>? configure = null, bool autoStart = true) where T : Hex1bAnimator, new()

Remarks ​

Use to obtain an instance scoped to a . The extension method handles time advancement and re-render scheduling automatically.

Released under the MIT License.