Show / Hide Table of Contents

Interface ITweenEngine

The tween engine drives the tweens and interfaces with the host environment.

Namespace: Sttz.Tweener.Core
Assembly: cs.temp.dll.dll
Syntax
public interface ITweenEngine
Remarks

Animate is the main entry point but contains mostly convenience methods. The heavy lifting is done in the tween engine, which is responsible for managing the groups and calling the update methods.

To configure the engine, it's possible to overwrite the factory method at EngineFactory to use a different configuration or to use a different engine altogether.

Properties

Options

The global options instance.

Declaration
TweenOptions Options { get; }
Property Value
Type Description
TweenOptions
See Also
Options

Pool

The pool used for pooling tweens and groups.

Declaration
TweenPool Pool { get; set; }
Property Value
Type Description
TweenPool
Remarks

This property can be set to null to completely disable pooling.

SinglesGroup

The group containing the tweens started by the To<TTarget, TValue>(TTarget, Single, String, TValue), From<TTarget, TValue>(TTarget, Single, String, TValue), FromTo<TTarget, TValue>(TTarget, Single, String, TValue, TValue) and By<TTarget, TValue>(TTarget, Single, String, TValue) methods.

Declaration
TweenGroup<object> SinglesGroup { get; }
Property Value
Type Description
TweenGroup<System.Object>
Remarks

All tweens need to be part of a group. In use cases where no group is explicitly set, this singles group is used.

Methods

Cancel(Object, String)

Declaration
void Cancel(object target, string property = null)
Parameters
Type Name Description
System.Object target
System.String property
See Also
Cancel(Object, String)

Create<TTarget, TValue>(TweenMethod, TTarget, Single, String, TValue, TValue, TValue, TweenOptions)

Generic tween creation method.

Declaration
Tween<TTarget, TValue> Create<TTarget, TValue>(TweenMethod tweenMethod, TTarget target, float duration, string property, TValue startValue, TValue endValue, TValue diffValue, TweenOptions parentOptions = null)
    where TTarget : class
Parameters
Type Name Description
TweenMethod tweenMethod
TTarget target
System.Single duration
System.String property
TValue startValue
TValue endValue
TValue diffValue
TweenOptions parentOptions
Returns
Type Description
Tween<TTarget, TValue>
Type Parameters
Name Description
TTarget
TValue
Remarks

This intended for internal use, use the various methods on Animate or TweenGroup instead.

Finish(Object, String)

Declaration
void Finish(object target, string property = null)
Parameters
Type Name Description
System.Object target
System.String property
See Also
Finish(Object, String)

Has(Object, String)

Declaration
bool Has(object target, string property = null)
Parameters
Type Name Description
System.Object target
System.String property
Returns
Type Description
System.Boolean
See Also
Has(Object, String)

LoadDynamicPlugins<TTarget, TValue>(Tween<TTarget, TValue>)

Internal method called by Tween to load non-static plugins.

Declaration
void LoadDynamicPlugins<TTarget, TValue>(Tween<TTarget, TValue> tween)
    where TTarget : class
Parameters
Type Name Description
Tween<TTarget, TValue> tween
Type Parameters
Name Description
TTarget
TValue

Overwrite(Tween)

Internal method called by Tween to do overwriting of tweens.

Declaration
void Overwrite(Tween tween)
Parameters
Type Name Description
Tween tween

RegisterGroup(TweenGroup)

Register a new group with the engine.

Declaration
void RegisterGroup(TweenGroup tweenGroup)
Parameters
Type Name Description
TweenGroup tweenGroup
Remarks

The engine retains the group until all its tweens have completed.

Stop(Object, String)

Declaration
void Stop(object target, string property = null)
Parameters
Type Name Description
System.Object target
System.String property
See Also
Stop(Object, String)

See Also

UnityTweenEngine
Back to top © 2018 Adrian Stutz