This commit is contained in:
Mausham
2026-05-28 17:09:12 +05:45
parent e6b6683feb
commit f9a2532495
18 changed files with 169 additions and 138 deletions

View File

@@ -10,7 +10,7 @@ namespace Darkmatter.Features.Colorbook.Installers
{
public void Register(IContainerBuilder builder)
{
builder.RegisterEntryPoint<ColorbookFlowController>(Lifetime.Singleton);
builder.RegisterEntryPoint<ColorbookFlowController>();
}
}
}

View File

@@ -1,6 +1,7 @@
using System.Threading;
using Cysharp.Threading.Tasks;
using Darkmatter.Core.Contracts.Features.DrawingCatalog;
using Darkmatter.Core.Contracts.Features.Loading;
using VContainer.Unity;
namespace Darkmatter.Features.Colorbook.System;
@@ -8,9 +9,18 @@ namespace Darkmatter.Features.Colorbook.System;
public class ColorbookFlowController : IAsyncStartable
{
private readonly IDrawingCatalogController _drawingCatalog;
private readonly ILoadingScreen _loadingScreen;
public ColorbookFlowController(IDrawingCatalogController drawingCatalog, ILoadingScreen loadingScreen)
{
_drawingCatalog = drawingCatalog;
_loadingScreen = loadingScreen;
}
public async UniTask StartAsync(CancellationToken cancellation = new CancellationToken())
{
_loadingScreen.SetProgress(1f);
await _drawingCatalog.InitializeAsync(cancellation);
_loadingScreen.Hide();
}
}

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Threading;
using Cysharp.Threading.Tasks;
using Darkmatter.Core.Contracts.Features.DrawingCatalog;
using Darkmatter.Features.DrawingCatalog.Systems;
using VContainer.Unity;
namespace Darkmatter.Features.DrawingCatalog
@@ -15,7 +14,7 @@ namespace Darkmatter.Features.DrawingCatalog
private readonly IDrawingTemplateCatalog _catalog;
private readonly CancellationTokenSource _cts = new();
public DrawingCatalogPresenter(DrawingCatalogView view, DrawingCatalogController controller,
public DrawingCatalogPresenter(DrawingCatalogView view, IDrawingCatalogController controller,
IDrawingTemplateCatalog catalog)
{
_view = view;

View File

@@ -41,6 +41,8 @@ namespace Darkmatter.Features.MainMenuFlow.Flow
_loadingScreen.Show();
var progress = new Progress<float>(p => _loadingScreen.SetProgress(p * 0.5f));
await _sceneService.LoadSceneAsync(nameof(GameScene.Colorbook), progress, ct);
var mappedProgress = new Progress<float>(p => _loadingScreen.SetProgress(0.5f + p * 0.25f));
await _sceneService.UnloadSceneAsync(nameof(GameScene.MainMenu),mappedProgress, ct);
}
public void Dispose()

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a06e8e44cb2363746a89c231e5be6509
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using Darkmatter.Core.Contracts.Services.Assets;
using Darkmatter.Libs.Installers;
using UnityEngine;
using VContainer;
namespace Darkmatter.Services.Assets.Installers
{
public class AssetsServiceModule : MonoBehaviour, IModule
{
public void Register(IContainerBuilder builder)
{
builder.Register<IAssetProviderService, AddressableAssetProviderService>(Lifetime.Singleton);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2e3baad744699014dba6885dfec20d9f

View File

@@ -6,7 +6,9 @@
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:593a5b492d29ac6448b1ebf7f035ef33",
"GUID:9e24947de15b9834991c9d8411ea37cf",
"GUID:84651a3751eca9349aac36a66bba901b"
"GUID:84651a3751eca9349aac36a66bba901b",
"GUID:b0214a6008ed146ff8f122a6a9c2f6cc",
"GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1"
],
"includePlatforms": [],
"excludePlatforms": [],