Skip to main content

TweenManager

Namespace: MonineEngine.Mathematics.Tweening

Helper class for using Tween<T>s.

public static class TweenManager

Inheritance ObjectTweenManager
Attributes NullableContextAttribute, NullableAttribute

Methods

Tween<T>(Object, String, T, Single, TweenOptions)

Creates and returns a new Tween<T> instance.

public static Tween<T> Tween<T>(object target, string memberName, T endValue, float duration, TweenOptions options)

Type Parameters

T
The type of the member to tween.

For example, if tweening a position, set this to Vector2. If tweening a color, set this to Color.

Parameters

target Object
The target object to be tweened.

memberName String
The name of the member within the target object being tweened.

endValue T
The value the member will be by the end of the Tween.

duration Single
The duration of the Tween in seconds.

options TweenOptions
Options for the Tween<T>.

Returns

Tween<T>
The TweenManager.Tween<T>(Object, String, T, Single, TweenOptions) created.

CancelTweensOf(Object)

Cancel all active Tween<T>s associated with the given object.

public static void CancelTweensOf(object target)

Parameters

target Object
The target object.

CancelAll()

Cancels all active Tween<T>s.

public static void CancelAll()

Update(GameTime)

Updates the TweenService.

public static void Update(GameTime gameTime)

Parameters

gameTime GameTime
A snapshot of the current time of the game in this update cycle.