99using System ;
1010using UnityEngine ;
1111using MyBox ;
12- using NUnit . Framework . Internal ;
1312
1413namespace JCSUnity
1514{
@@ -36,10 +35,6 @@ public class JCS_Canvas : MonoBehaviour
3635 // Execution when canvas is hidden by fading.
3736 public Action < JCS_Canvas > onHideFade = null ;
3837
39-
40-
41-
42-
4338 private RectTransform mAppRect = null ; // Application Rect (Window)
4439
4540#if UNITY_EDITOR
@@ -70,6 +65,16 @@ public class JCS_Canvas : MonoBehaviour
7065 [ ReadOnly ]
7166 private CanvasGroup mCanvasGroup = null ;
7267
68+ [ Tooltip ( "Target fading alpha." ) ]
69+ [ SerializeField ]
70+ [ ReadOnly ]
71+ private float mFadeAlpa = 0.0f ;
72+
73+ [ Tooltip ( "Type of fading currently used." ) ]
74+ [ SerializeField ]
75+ [ ReadOnly ]
76+ private JCS_FadeType mFading = JCS_FadeType . NONE ;
77+
7378 [ Tooltip ( "Resize object." ) ]
7479 [ SerializeField ]
7580 [ ReadOnly ]
@@ -106,11 +111,6 @@ public class JCS_Canvas : MonoBehaviour
106111 [ Range ( 0.0f , 1.0f ) ]
107112 private float mFadeOutAmount = 0.0f ;
108113
109- // Target fading alpha.
110- private float mFadeAlpa = 0.0f ;
111-
112- private JCS_FadeType mFading = JCS_FadeType . NONE ;
113-
114114 [ Tooltip ( "The time type." ) ]
115115 [ SerializeField ]
116116 private JCS_TimeType mTimeType = JCS_TimeType . UNSCALED_DELTA_TIME ;
@@ -268,7 +268,7 @@ public void Show(bool fade, bool mute = false)
268268
269269 mCanvas . enabled = true ;
270270
271- if ( fade && mCanvasGroup )
271+ if ( fade )
272272 {
273273 mFading = JCS_FadeType . IN ;
274274
@@ -295,7 +295,7 @@ public void Hide(bool fade, bool mute = false)
295295 if ( ! mute )
296296 JCS_SoundPlayer . PlayByAttachment ( mActiveSound , JCS_SoundMethod . PLAY_SOUND ) ;
297297
298- if ( fade && mCanvasGroup )
298+ if ( fade )
299299 {
300300 // Remains enabled since we're going to do fading.
301301 mCanvas . enabled = true ;
0 commit comments