|
|
|
@ -30,6 +30,9 @@ namespace Fungus
|
|
|
|
|
[Tooltip("The type of loop to apply once the animation has completed")] |
|
|
|
|
public iTween.LoopType loopType = iTween.LoopType.none; |
|
|
|
|
|
|
|
|
|
[Tooltip("Stop any previously added iTweens on this object before adding this iTween")] |
|
|
|
|
public bool stopPreviousTweens = false; |
|
|
|
|
|
|
|
|
|
[Tooltip("Wait until the tween has finished before executing the next command")] |
|
|
|
|
public bool waitUntilFinished = true; |
|
|
|
|
|
|
|
|
@ -41,12 +44,15 @@ namespace Fungus
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (stopPreviousTweens) |
|
|
|
|
{ |
|
|
|
|
// Force any existing iTweens on this target object to complete immediately |
|
|
|
|
iTween[] tweens = targetObject.GetComponents<iTween>(); |
|
|
|
|
foreach (iTween tween in tweens) { |
|
|
|
|
tween.time = 0; |
|
|
|
|
tween.SendMessage("Update"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DoTween(); |
|
|
|
|
|
|
|
|
|