net.dreditor.fading 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.attestation.p7m +0 -0
- package/DREditor.Fading.asmdef +16 -16
- package/DREditor.Fading.asmdef.meta +7 -7
- package/GlobalFade.cs +103 -103
- package/GlobalFade.cs.meta +11 -11
- package/GlobalFadeHandler.cs +258 -258
- package/GlobalFadeHandler.cs.meta +11 -11
- package/{Samples → Samples~}/Global_Fade_Canvas.prefab +185 -185
- package/{Samples → Samples~}/Global_Fade_Canvas.prefab.meta +7 -7
- package/{Samples → Samples~}/ScreenIsDark.asset +21 -21
- package/{Samples → Samples~}/ScreenIsDark.asset.meta +8 -8
- package/package.json +41 -36
- package/{Samples.meta → package.json.meta} +7 -8
package/GlobalFadeHandler.cs
CHANGED
|
@@ -1,259 +1,259 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if DOTWEEN
|
|
3
|
-
using DG.Tweening;
|
|
4
|
-
#endif
|
|
5
|
-
using DREditor.EventObjects;
|
|
6
|
-
using DREditor.Services;
|
|
7
|
-
using DREditor.Utility;
|
|
8
|
-
using System.Collections;
|
|
9
|
-
using UnityEngine;
|
|
10
|
-
using UnityEngine.UI;
|
|
11
|
-
|
|
12
|
-
namespace DREditor.Fading
|
|
13
|
-
{
|
|
14
|
-
/// <summary>
|
|
15
|
-
///
|
|
16
|
-
/// </summary>
|
|
17
|
-
[ClassHeader(nameof(ServiceHolder<GlobalFade>) + " for type: " + nameof(GlobalFade) +
|
|
18
|
-
"\n\n")]
|
|
19
|
-
public class GlobalFadeHandler : GlobalFade, IToTitleScreen
|
|
20
|
-
{
|
|
21
|
-
/// <summary>
|
|
22
|
-
///
|
|
23
|
-
/// </summary>
|
|
24
|
-
[Header("")]
|
|
25
|
-
[Divider]
|
|
26
|
-
[Tooltip("")]
|
|
27
|
-
[SerializeField] protected bool debugLogs = false;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/// <summary>
|
|
31
|
-
///
|
|
32
|
-
/// </summary>
|
|
33
|
-
[Header("")]
|
|
34
|
-
[Divider]
|
|
35
|
-
[Tooltip("")]
|
|
36
|
-
[SerializeField] protected BoolWithEvent inFastForwardMode = null;
|
|
37
|
-
|
|
38
|
-
/// <summary>
|
|
39
|
-
///
|
|
40
|
-
/// </summary>
|
|
41
|
-
[Tooltip("")]
|
|
42
|
-
[SerializeField] protected SceneEvent onFadeOutComplete = null;
|
|
43
|
-
|
|
44
|
-
/// <summary>
|
|
45
|
-
///
|
|
46
|
-
/// </summary>
|
|
47
|
-
[Tooltip("")]
|
|
48
|
-
[SerializeField] protected Image Fade = null;
|
|
49
|
-
|
|
50
|
-
/// <summary>
|
|
51
|
-
///
|
|
52
|
-
/// </summary>
|
|
53
|
-
[Tooltip("")]
|
|
54
|
-
[SerializeField] protected float toTitleWaitTime = 0.3f;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/// <summary>
|
|
58
|
-
///
|
|
59
|
-
/// </summary>
|
|
60
|
-
protected string lastFadeCaller;
|
|
61
|
-
|
|
62
|
-
/// <summary>
|
|
63
|
-
///
|
|
64
|
-
/// </summary>
|
|
65
|
-
protected Coroutine fadeToRoutine;
|
|
66
|
-
|
|
67
|
-
/// <summary>
|
|
68
|
-
///
|
|
69
|
-
/// </summary>
|
|
70
|
-
protected Coroutine fadeOutRoutine;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/// <inheritdoc/>
|
|
74
|
-
protected override bool IsUIDark() => Fade.color.a != 0;
|
|
75
|
-
|
|
76
|
-
/// <inheritdoc/>
|
|
77
|
-
public override void FadeTo(float time, bool white = false, bool overrule = false) =>
|
|
78
|
-
fadeToRoutine = StartCoroutine(FadeToRoutine(time, white, overrule));
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/// <inheritdoc/>
|
|
82
|
-
public override IEnumerator FadeToRoutine(float time, bool white = false, bool overrule = false)
|
|
83
|
-
{
|
|
84
|
-
lastFadeCaller = StackTraceUtility.ExtractStackTrace();
|
|
85
|
-
|
|
86
|
-
return FadeToRoutineInternal(time, white, overrule);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/// <summary>
|
|
90
|
-
///
|
|
91
|
-
/// </summary>
|
|
92
|
-
/// <remarks></remarks>
|
|
93
|
-
/// <param name="time"></param>
|
|
94
|
-
/// <param name="white"></param>
|
|
95
|
-
/// <param name="overrule"></param>
|
|
96
|
-
protected virtual IEnumerator FadeToRoutineInternal(float time, bool white = false, bool overrule = false)
|
|
97
|
-
{
|
|
98
|
-
if (FailedFade(overrule, "TO"))
|
|
99
|
-
yield break;
|
|
100
|
-
|
|
101
|
-
if (isTransitioning && overrule && fadeOutRoutine != null)
|
|
102
|
-
{
|
|
103
|
-
KillFade();
|
|
104
|
-
|
|
105
|
-
StopCoroutine(fadeOutRoutine);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
LogWarning($"Called Fade {gameObject.name} {isTransitioning} {overrule}");
|
|
109
|
-
|
|
110
|
-
isTransitioning = true;
|
|
111
|
-
|
|
112
|
-
SetColor(white);
|
|
113
|
-
|
|
114
|
-
if (inFastForwardMode.Value)
|
|
115
|
-
time /= 2;
|
|
116
|
-
|
|
117
|
-
IsDark = true;
|
|
118
|
-
#if DOTWEEN
|
|
119
|
-
Fade.DOFade(1, time)
|
|
120
|
-
.SetUpdate(!inFastForwardMode.Value);
|
|
121
|
-
#endif
|
|
122
|
-
yield return new WaitForSecondsRealtime(time);
|
|
123
|
-
|
|
124
|
-
isTransitioning = false;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
/// <inheritdoc/>
|
|
129
|
-
public override void FadeOut(float time, bool white = false, bool overrule = false) =>
|
|
130
|
-
fadeOutRoutine = StartCoroutine(FadeOutRoutine(time, white, overrule));
|
|
131
|
-
|
|
132
|
-
/// <inheritdoc/>
|
|
133
|
-
public override IEnumerator FadeOutRoutine(float time, bool white, bool overrule)
|
|
134
|
-
{
|
|
135
|
-
lastFadeCaller = StackTraceUtility.ExtractStackTrace();
|
|
136
|
-
|
|
137
|
-
return FadeOutRoutineInternal(time, white, overrule);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/// <summary>
|
|
141
|
-
///
|
|
142
|
-
/// </summary>
|
|
143
|
-
/// <remarks></remarks>
|
|
144
|
-
/// <param name="time"></param>
|
|
145
|
-
/// <param name="white"></param>
|
|
146
|
-
/// <param name="overrule"></param>
|
|
147
|
-
protected virtual IEnumerator FadeOutRoutineInternal(float time, bool white = false, bool overrule = false)
|
|
148
|
-
{
|
|
149
|
-
if (FailedFade(overrule, "OUT"))
|
|
150
|
-
yield break;
|
|
151
|
-
|
|
152
|
-
if (overrule)
|
|
153
|
-
{
|
|
154
|
-
KillFade();
|
|
155
|
-
|
|
156
|
-
if (isTransitioning && fadeToRoutine != null)
|
|
157
|
-
StopCoroutine(fadeToRoutine);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
isTransitioning = true;
|
|
161
|
-
|
|
162
|
-
SetColor(white);
|
|
163
|
-
|
|
164
|
-
LogWarning("FADE OUT WAS CALLED, OVERRULING WAS: " + overrule);
|
|
165
|
-
|
|
166
|
-
if (inFastForwardMode.Value)
|
|
167
|
-
time /= 2;
|
|
168
|
-
|
|
169
|
-
IsDark = false;
|
|
170
|
-
#if DOTWEEN
|
|
171
|
-
Fade.DOFade(0, time)
|
|
172
|
-
.SetUpdate(!inFastForwardMode.Value);
|
|
173
|
-
#endif
|
|
174
|
-
yield return new WaitForSecondsRealtime(time);
|
|
175
|
-
|
|
176
|
-
isTransitioning = false;
|
|
177
|
-
|
|
178
|
-
if (onFadeOutComplete != null)
|
|
179
|
-
onFadeOutComplete.Raise();
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/// <summary>
|
|
183
|
-
///
|
|
184
|
-
/// </summary>
|
|
185
|
-
/// <param name="overrule"></param>
|
|
186
|
-
/// <param name="fadeType"></param>
|
|
187
|
-
/// <returns></returns>
|
|
188
|
-
protected virtual bool FailedFade(bool overrule, string fadeType)
|
|
189
|
-
{
|
|
190
|
-
bool result = isTransitioning && !overrule;
|
|
191
|
-
|
|
192
|
-
if (result)
|
|
193
|
-
LogWarning($"Failed Attempt to Fade " + fadeType);
|
|
194
|
-
|
|
195
|
-
return result;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/// <summary>
|
|
199
|
-
///
|
|
200
|
-
/// </summary>
|
|
201
|
-
protected virtual void KillFade()
|
|
202
|
-
{
|
|
203
|
-
#if DOTWEEN
|
|
204
|
-
Fade.DOKill();
|
|
205
|
-
#endif
|
|
206
|
-
LogWarning("FADE Killed");
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/// <summary>
|
|
210
|
-
///
|
|
211
|
-
/// </summary>
|
|
212
|
-
/// <param name="white"></param>
|
|
213
|
-
protected virtual void SetColor(bool white)
|
|
214
|
-
{
|
|
215
|
-
if (white)
|
|
216
|
-
Fade.color = new Color(1f, 1f, 1f, Fade.color.a);
|
|
217
|
-
else
|
|
218
|
-
Fade.color = new Color(0f, 0f, 0f, Fade.color.a);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/// <summary>
|
|
222
|
-
///
|
|
223
|
-
/// </summary>
|
|
224
|
-
/// <param name="message"></param>
|
|
225
|
-
protected virtual void LogWarning(string message)
|
|
226
|
-
{
|
|
227
|
-
if (debugLogs)
|
|
228
|
-
UnityEngine.Debug.LogWarning($"ALERT: {gameObject.name}: {message} \n{lastFadeCaller}");
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
/// <inheritdoc/>
|
|
233
|
-
public virtual void ToTitleScreen()
|
|
234
|
-
{
|
|
235
|
-
if (!IsDark)
|
|
236
|
-
FadeTo(toTitleWaitTime);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
/// <summary>
|
|
241
|
-
///
|
|
242
|
-
/// </summary>
|
|
243
|
-
[BehaviourButton]
|
|
244
|
-
protected virtual void ToggleFadeState() => ForceVisibility(!IsDark);
|
|
245
|
-
|
|
246
|
-
/// <summary>
|
|
247
|
-
///
|
|
248
|
-
/// </summary>
|
|
249
|
-
/// <param name="visible"></param>
|
|
250
|
-
protected virtual void ForceVisibility(bool visible)
|
|
251
|
-
{
|
|
252
|
-
float alpha = visible ? 1f : 0f;
|
|
253
|
-
|
|
254
|
-
Fade.color = Fade.color.WithAlpha(alpha);
|
|
255
|
-
|
|
256
|
-
IsDark = visible;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if DOTWEEN
|
|
3
|
+
using DG.Tweening;
|
|
4
|
+
#endif
|
|
5
|
+
using DREditor.EventObjects;
|
|
6
|
+
using DREditor.Services;
|
|
7
|
+
using DREditor.Utility;
|
|
8
|
+
using System.Collections;
|
|
9
|
+
using UnityEngine;
|
|
10
|
+
using UnityEngine.UI;
|
|
11
|
+
|
|
12
|
+
namespace DREditor.Fading
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[ClassHeader(nameof(ServiceHolder<GlobalFade>) + " for type: " + nameof(GlobalFade) +
|
|
18
|
+
"\n\n")]
|
|
19
|
+
public class GlobalFadeHandler : GlobalFade, IToTitleScreen
|
|
20
|
+
{
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
[Header("")]
|
|
25
|
+
[Divider]
|
|
26
|
+
[Tooltip("")]
|
|
27
|
+
[SerializeField] protected bool debugLogs = false;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
///
|
|
32
|
+
/// </summary>
|
|
33
|
+
[Header("")]
|
|
34
|
+
[Divider]
|
|
35
|
+
[Tooltip("")]
|
|
36
|
+
[SerializeField] protected BoolWithEvent inFastForwardMode = null;
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
///
|
|
40
|
+
/// </summary>
|
|
41
|
+
[Tooltip("")]
|
|
42
|
+
[SerializeField] protected SceneEvent onFadeOutComplete = null;
|
|
43
|
+
|
|
44
|
+
/// <summary>
|
|
45
|
+
///
|
|
46
|
+
/// </summary>
|
|
47
|
+
[Tooltip("")]
|
|
48
|
+
[SerializeField] protected Image Fade = null;
|
|
49
|
+
|
|
50
|
+
/// <summary>
|
|
51
|
+
///
|
|
52
|
+
/// </summary>
|
|
53
|
+
[Tooltip("")]
|
|
54
|
+
[SerializeField] protected float toTitleWaitTime = 0.3f;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/// <summary>
|
|
58
|
+
///
|
|
59
|
+
/// </summary>
|
|
60
|
+
protected string lastFadeCaller;
|
|
61
|
+
|
|
62
|
+
/// <summary>
|
|
63
|
+
///
|
|
64
|
+
/// </summary>
|
|
65
|
+
protected Coroutine fadeToRoutine;
|
|
66
|
+
|
|
67
|
+
/// <summary>
|
|
68
|
+
///
|
|
69
|
+
/// </summary>
|
|
70
|
+
protected Coroutine fadeOutRoutine;
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/// <inheritdoc/>
|
|
74
|
+
protected override bool IsUIDark() => Fade.color.a != 0;
|
|
75
|
+
|
|
76
|
+
/// <inheritdoc/>
|
|
77
|
+
public override void FadeTo(float time, bool white = false, bool overrule = false) =>
|
|
78
|
+
fadeToRoutine = StartCoroutine(FadeToRoutine(time, white, overrule));
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/// <inheritdoc/>
|
|
82
|
+
public override IEnumerator FadeToRoutine(float time, bool white = false, bool overrule = false)
|
|
83
|
+
{
|
|
84
|
+
lastFadeCaller = StackTraceUtility.ExtractStackTrace();
|
|
85
|
+
|
|
86
|
+
return FadeToRoutineInternal(time, white, overrule);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/// <summary>
|
|
90
|
+
///
|
|
91
|
+
/// </summary>
|
|
92
|
+
/// <remarks></remarks>
|
|
93
|
+
/// <param name="time"></param>
|
|
94
|
+
/// <param name="white"></param>
|
|
95
|
+
/// <param name="overrule"></param>
|
|
96
|
+
protected virtual IEnumerator FadeToRoutineInternal(float time, bool white = false, bool overrule = false)
|
|
97
|
+
{
|
|
98
|
+
if (FailedFade(overrule, "TO"))
|
|
99
|
+
yield break;
|
|
100
|
+
|
|
101
|
+
if (isTransitioning && overrule && fadeOutRoutine != null)
|
|
102
|
+
{
|
|
103
|
+
KillFade();
|
|
104
|
+
|
|
105
|
+
StopCoroutine(fadeOutRoutine);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
LogWarning($"Called Fade {gameObject.name} {isTransitioning} {overrule}");
|
|
109
|
+
|
|
110
|
+
isTransitioning = true;
|
|
111
|
+
|
|
112
|
+
SetColor(white);
|
|
113
|
+
|
|
114
|
+
if (inFastForwardMode.Value)
|
|
115
|
+
time /= 2;
|
|
116
|
+
|
|
117
|
+
IsDark = true;
|
|
118
|
+
#if DOTWEEN
|
|
119
|
+
Fade.DOFade(1, time)
|
|
120
|
+
.SetUpdate(!inFastForwardMode.Value);
|
|
121
|
+
#endif
|
|
122
|
+
yield return new WaitForSecondsRealtime(time);
|
|
123
|
+
|
|
124
|
+
isTransitioning = false;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
/// <inheritdoc/>
|
|
129
|
+
public override void FadeOut(float time, bool white = false, bool overrule = false) =>
|
|
130
|
+
fadeOutRoutine = StartCoroutine(FadeOutRoutine(time, white, overrule));
|
|
131
|
+
|
|
132
|
+
/// <inheritdoc/>
|
|
133
|
+
public override IEnumerator FadeOutRoutine(float time, bool white, bool overrule)
|
|
134
|
+
{
|
|
135
|
+
lastFadeCaller = StackTraceUtility.ExtractStackTrace();
|
|
136
|
+
|
|
137
|
+
return FadeOutRoutineInternal(time, white, overrule);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/// <summary>
|
|
141
|
+
///
|
|
142
|
+
/// </summary>
|
|
143
|
+
/// <remarks></remarks>
|
|
144
|
+
/// <param name="time"></param>
|
|
145
|
+
/// <param name="white"></param>
|
|
146
|
+
/// <param name="overrule"></param>
|
|
147
|
+
protected virtual IEnumerator FadeOutRoutineInternal(float time, bool white = false, bool overrule = false)
|
|
148
|
+
{
|
|
149
|
+
if (FailedFade(overrule, "OUT"))
|
|
150
|
+
yield break;
|
|
151
|
+
|
|
152
|
+
if (overrule)
|
|
153
|
+
{
|
|
154
|
+
KillFade();
|
|
155
|
+
|
|
156
|
+
if (isTransitioning && fadeToRoutine != null)
|
|
157
|
+
StopCoroutine(fadeToRoutine);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
isTransitioning = true;
|
|
161
|
+
|
|
162
|
+
SetColor(white);
|
|
163
|
+
|
|
164
|
+
LogWarning("FADE OUT WAS CALLED, OVERRULING WAS: " + overrule);
|
|
165
|
+
|
|
166
|
+
if (inFastForwardMode.Value)
|
|
167
|
+
time /= 2;
|
|
168
|
+
|
|
169
|
+
IsDark = false;
|
|
170
|
+
#if DOTWEEN
|
|
171
|
+
Fade.DOFade(0, time)
|
|
172
|
+
.SetUpdate(!inFastForwardMode.Value);
|
|
173
|
+
#endif
|
|
174
|
+
yield return new WaitForSecondsRealtime(time);
|
|
175
|
+
|
|
176
|
+
isTransitioning = false;
|
|
177
|
+
|
|
178
|
+
if (onFadeOutComplete != null)
|
|
179
|
+
onFadeOutComplete.Raise();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/// <summary>
|
|
183
|
+
///
|
|
184
|
+
/// </summary>
|
|
185
|
+
/// <param name="overrule"></param>
|
|
186
|
+
/// <param name="fadeType"></param>
|
|
187
|
+
/// <returns></returns>
|
|
188
|
+
protected virtual bool FailedFade(bool overrule, string fadeType)
|
|
189
|
+
{
|
|
190
|
+
bool result = isTransitioning && !overrule;
|
|
191
|
+
|
|
192
|
+
if (result)
|
|
193
|
+
LogWarning($"Failed Attempt to Fade " + fadeType);
|
|
194
|
+
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/// <summary>
|
|
199
|
+
///
|
|
200
|
+
/// </summary>
|
|
201
|
+
protected virtual void KillFade()
|
|
202
|
+
{
|
|
203
|
+
#if DOTWEEN
|
|
204
|
+
Fade.DOKill();
|
|
205
|
+
#endif
|
|
206
|
+
LogWarning("FADE Killed");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/// <summary>
|
|
210
|
+
///
|
|
211
|
+
/// </summary>
|
|
212
|
+
/// <param name="white"></param>
|
|
213
|
+
protected virtual void SetColor(bool white)
|
|
214
|
+
{
|
|
215
|
+
if (white)
|
|
216
|
+
Fade.color = new Color(1f, 1f, 1f, Fade.color.a);
|
|
217
|
+
else
|
|
218
|
+
Fade.color = new Color(0f, 0f, 0f, Fade.color.a);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/// <summary>
|
|
222
|
+
///
|
|
223
|
+
/// </summary>
|
|
224
|
+
/// <param name="message"></param>
|
|
225
|
+
protected virtual void LogWarning(string message)
|
|
226
|
+
{
|
|
227
|
+
if (debugLogs)
|
|
228
|
+
UnityEngine.Debug.LogWarning($"ALERT: {gameObject.name}: {message} \n{lastFadeCaller}");
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
/// <inheritdoc/>
|
|
233
|
+
public virtual void ToTitleScreen()
|
|
234
|
+
{
|
|
235
|
+
if (!IsDark)
|
|
236
|
+
FadeTo(toTitleWaitTime);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
/// <summary>
|
|
241
|
+
///
|
|
242
|
+
/// </summary>
|
|
243
|
+
[BehaviourButton]
|
|
244
|
+
protected virtual void ToggleFadeState() => ForceVisibility(!IsDark);
|
|
245
|
+
|
|
246
|
+
/// <summary>
|
|
247
|
+
///
|
|
248
|
+
/// </summary>
|
|
249
|
+
/// <param name="visible"></param>
|
|
250
|
+
protected virtual void ForceVisibility(bool visible)
|
|
251
|
+
{
|
|
252
|
+
float alpha = visible ? 1f : 0f;
|
|
253
|
+
|
|
254
|
+
Fade.color = Fade.color.WithAlpha(alpha);
|
|
255
|
+
|
|
256
|
+
IsDark = visible;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
259
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: e16cd8453635d8946bcd2319ae21bfd7
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: e16cd8453635d8946bcd2319ae21bfd7
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|