File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -736,6 +736,7 @@ private void ContinueTween()
736736 }
737737
738738 float distance = 0 ;
739+
739740 Vector3 selfVal = GetSelfTransformTypeVector3 ( ) ;
740741 Vector3 targetVal = GetTargetTransformTypeVector3 ( ) ;
741742
@@ -752,9 +753,9 @@ private void ContinueTween()
752753 // record down the target position
753754 mRecordTargetTransformValue = targetVal ;
754755
755-
756756 // Check if close enough to the distance we target.
757757 distance = Vector3 . Distance ( selfVal , targetVal ) ;
758+
758759 if ( distance <= mStopTweenDistance )
759760 {
760761 // call the call back.
Original file line number Diff line number Diff line change @@ -385,6 +385,14 @@ public void ToggleVisibility(bool mute = false)
385385 Show ( mute ) ;
386386 }
387387
388+ /// <summary>
389+ /// Return true if the canvas is fading in/out.
390+ /// </summary>
391+ public bool IsFading ( )
392+ {
393+ return mFading != JCS_FadeType . NONE ;
394+ }
395+
388396 /// <summary>
389397 /// Prompt warning if there are multiple main canvases in the scene.
390398 /// </summary>
Original file line number Diff line number Diff line change @@ -69,5 +69,6 @@ protected virtual void Awake()
6969 public virtual void Show ( bool mute = false ) => mCanvas . Show ( mute ) ;
7070 public virtual void Hide ( bool mute = false ) => mCanvas . Hide ( mute ) ;
7171 public virtual void ToggleVisibility ( bool mute = false ) => mCanvas . ToggleVisibility ( mute ) ;
72+ public virtual bool IsFading ( ) => mCanvas . IsFading ( ) ;
7273 }
7374}
You can’t perform that action at this time.
0 commit comments