File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Assets/JCSUnity/Scripts/Effects/Tweener Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,16 @@ public class JCS_TransformTweener : JCS_UnityObject
20
20
{
21
21
/* Variables */
22
22
23
+ // Callback to execute when start tweening.
23
24
public Action onStart = null ;
25
+
26
+ // Callback to execute when done tweening.
24
27
public Action onDone = null ;
25
28
29
+ // Callback to execute when done tweening but only with that
30
+ // specific function call.
31
+ private Action mOnDone = null ;
32
+
26
33
#if UNITY_EDITOR
27
34
[ Separator ( "Helper Variables (JCS_TransformTweener)" ) ]
28
35
@@ -617,6 +624,7 @@ private void SafeDoCallback()
617
624
if ( ! this . mDoneTweenX || ! this . mDoneTweenY || ! this . mDoneTweenZ )
618
625
return ;
619
626
627
+ mOnDone ? . Invoke ( ) ;
620
628
onDone ? . Invoke ( ) ;
621
629
}
622
630
@@ -664,7 +672,7 @@ private void StartTween(
664
672
Action callback = null )
665
673
{
666
674
onStart ? . Invoke ( ) ;
667
- onDone = callback ;
675
+ mOnDone = callback ;
668
676
669
677
this . mIsDoneTweening = false ;
670
678
this . mDoneTweenX = false ;
You can’t perform that action at this time.
0 commit comments