-
Notifications
You must be signed in to change notification settings - Fork 1
onUpdate
Jan-Ole Schümann edited this page Jun 3, 2017
·
2 revisions
Defines the method which is called on every update of the tween.
Parameter: Action or Action<object>
Example: "onUpdate", onTweenUpdate
In this example, the method "onTweenUpdate" is called on every tween update and logs the current progress of the tween.
TweenSharp tween;
Action onTweenUpdate= this.onTweenUpdate;
tween = new TweenSharp(gameObject, 5f, new
{
x = 8f,
onUpdate = new Action(onTweenUpdate)
});
private void onTweenUpdate()
{
Debug.Log("Progress: " + tween.Progress);
}