Skip to content

Hex1bAnimator ​

Namespace: Hex1b.Animation

Assembly: Hex1b.dll

Base class for animations that progress over a duration with easing. Provides Start/Pause/Resume/Reset lifecycle and Advance(elapsed) for ticking.

csharp
public abstract class Hex1bAnimator

Inheritance ​

Object → Hex1bAnimator

Properties ​

Duration ​

Duration of the animation.

Returns: TimeSpan

csharp
public TimeSpan Duration { get; set; }

EasingFunction ​

Easing function applied to raw progress. Defaults to Linear.

Returns: Func<Double, Double>

csharp
public Func<double, double> EasingFunction { get; set; }

IsCompleted ​

Whether the animation has completed (progress reached 1.0 and not repeating).

Returns: Boolean

csharp
public bool IsCompleted { get; }

IsPaused ​

Whether the animation is paused.

Returns: Boolean

csharp
public bool IsPaused { get; }

IsRunning ​

Whether the animation is currently running (not paused, not completed).

Returns: Boolean

csharp
public bool IsRunning { get; }

Progress ​

Eased progress (0..1).

Returns: Double

csharp
public double Progress { get; }

Repeat ​

Whether the animation repeats after completing.

Returns: Boolean

csharp
public bool Repeat { get; set; }

Reverse ​

Whether the animation reverses direction on each cycle.

Returns: Boolean

csharp
public bool Reverse { get; set; }

Methods ​

Pause() ​

Pauses the animation at its current progress.

csharp
public void Pause()

Reset() ​

Resets the animation to the beginning without starting it.

csharp
public void Reset()

Restart() ​

Restarts the animation (equivalent to Reset + Start).

csharp
public void Restart()

Resume() ​

Resumes a paused animation.

csharp
public void Resume()

Start() ​

Starts or restarts the animation from the beginning.

csharp
public void Start()

Released under the MIT License.