Skip to content

Commit ca3e1e8

Browse files
committed
en
1 parent cdbecc7 commit ca3e1e8

File tree

5 files changed

+2514
-14
lines changed

5 files changed

+2514
-14
lines changed

Assets/JCSUnity/Scripts/UI/JCS_Canvas.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using System;
1010
using UnityEngine;
1111
using MyBox;
12-
using NUnit.Framework.Internal;
1312

1413
namespace 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;

Assets/JCSUnity/Scripts/UI/JCS_CanvasComp.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class JCS_CanvasComp<T> : MonoBehaviour
1616

1717
/* Setter & Getter */
1818

19+
public JCS_Canvas canvas { get { return this.mCanvas; } }
20+
1921
/* Functions */
2022

2123
protected virtual void Awake()

Assets/_Project/Scenes/Sound/FT_SoundSlider.unity

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,9 @@ MonoBehaviour:
344344
mCanvas: {fileID: 0}
345345
mCanvasGroup: {fileID: 0}
346346
mResizeUI: {fileID: 0}
347-
mDisplayOnAwake: 1
347+
mDisplayOnAwake: 0
348348
mMainCanvas: 0
349-
mFade: 1
349+
mFade: 0
350350
mFadeFriction: 0.2
351351
mFadeInAmount: 1
352352
mFadeOutAmount: 0

0 commit comments

Comments
 (0)