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
2020 {
2121 /* Variables */
2222
23+ // Callback to execute when start tweening.
2324 public Action onStart = null ;
25+
26+ // Callback to execute when done tweening.
2427 public Action onDone = null ;
2528
29+ // Callback to execute when done tweening but only with that
30+ // specific function call.
31+ private Action mOnDone = null ;
32+
2633#if UNITY_EDITOR
2734 [ Separator ( "Helper Variables (JCS_TransformTweener)" ) ]
2835
@@ -617,6 +624,7 @@ private void SafeDoCallback()
617624 if ( ! this . mDoneTweenX || ! this . mDoneTweenY || ! this . mDoneTweenZ )
618625 return ;
619626
627+ mOnDone ? . Invoke ( ) ;
620628 onDone ? . Invoke ( ) ;
621629 }
622630
@@ -664,7 +672,7 @@ private void StartTween(
664672 Action callback = null )
665673 {
666674 onStart ? . Invoke ( ) ;
667- onDone = callback ;
675+ mOnDone = callback ;
668676
669677 this . mIsDoneTweening = false ;
670678 this . mDoneTweenX = false ;
You can’t perform that action at this time.
0 commit comments