com.puzzlescapegames.services 1.3.1 → 1.3.2
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.
|
@@ -24,7 +24,7 @@ namespace PuzzlescapeGames.Services.UITransitionService
|
|
|
24
24
|
Action onLoaded = null,
|
|
25
25
|
Action onHided = null,
|
|
26
26
|
CancellationToken cancellationToken = default,
|
|
27
|
-
params UniTask[] tasks
|
|
27
|
+
params Func< UniTask >[] tasks
|
|
28
28
|
)
|
|
29
29
|
{
|
|
30
30
|
await LoadThroughBlank( _settings.LoadingSettings[ index ], onShowed, onLoaded, onHided, cancellationToken, tasks );
|
|
@@ -36,7 +36,7 @@ namespace PuzzlescapeGames.Services.UITransitionService
|
|
|
36
36
|
Action onLoaded = null,
|
|
37
37
|
Action onHided = null,
|
|
38
38
|
CancellationToken cancellationToken = default,
|
|
39
|
-
params UniTask[] tasks
|
|
39
|
+
params Func< UniTask >[] tasks
|
|
40
40
|
)
|
|
41
41
|
{
|
|
42
42
|
var loading = _settings.LoadingSettings.FirstOrDefault( ( x ) => string.Equals( x.UID, uid, StringComparison.InvariantCultureIgnoreCase ) );
|
|
@@ -49,7 +49,7 @@ namespace PuzzlescapeGames.Services.UITransitionService
|
|
|
49
49
|
Action onLoaded = null,
|
|
50
50
|
Action onHided = null,
|
|
51
51
|
CancellationToken cancellationToken = default,
|
|
52
|
-
params UniTask[] tasks
|
|
52
|
+
params Func< UniTask >[] tasks
|
|
53
53
|
)
|
|
54
54
|
{
|
|
55
55
|
if ( _blank == null )
|
|
@@ -62,7 +62,7 @@ namespace PuzzlescapeGames.Services.UITransitionService
|
|
|
62
62
|
if ( tasks.Length > 0 )
|
|
63
63
|
{
|
|
64
64
|
var start = Time.time;
|
|
65
|
-
await UniTask.WhenAll( tasks );
|
|
65
|
+
await UniTask.WhenAll( tasks.Select( ( func ) => func() ) );
|
|
66
66
|
var diff = loading.LoadingTime - ( Time.time - start );
|
|
67
67
|
if ( diff > 0f )
|
|
68
68
|
{
|