Show / Hide Table of Contents

Enum TweenCompletedBy

How a tween was completed.

Namespace: Sttz.Tweener
Assembly: cs.temp.dll.dll
Syntax
[Flags]
public enum TweenCompletedBy
Remarks

This is a flags enumeration and some of its fields can occur in combination, e.g. if the tween was stopped, finished or canceled, the value can also contain the Overwrite flag to indicate the completion was caused by the tween being overwritten.

To properly check for a flag in the CompletedBy value you need to use binary-and:

if ((tween.CompletedBy & TweenCompletedBy.Stop) > 0) {
    // Tween was stopped (overwritten or not)
}
if ((tween.CompletedBy & TweenCompletedBy.Overwrite) > 0) {
    // Tween was overwritten (stopped, finished or cancelled)
}

Fields

Name Description
Cancel

Tween was canceled (set to its start value).

Complete

Tween completed regularly by reaching its end.

Finish

Tween was finished (set to its end value).

Overwrite

Tween was overwritten (always in combination with Stop, Finish or Cancel).

Stop

Tween was stopped (left at its current value).

Undefined

Undefined value.

See Also
CompletedBy
CompletedBy
Back to top © 2018 Adrian Stutz