init: add project

This commit is contained in:
Bragin Stepan
2026-02-18 23:02:28 +05:00
commit 4f01e66894
620 changed files with 52253 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
using _Project.Develop.Runtime.UI;
using _Project.Develop.Runtime.UI.Core;
using _Project.Develop.Runtime.UI.Screens.MainMenu;
using Assets._Project.Develop.Runtime.Infrastructure.DI;
using Assets._Project.Develop.Runtime.Utilities.AssetsManagement;
using Assets._Project.Develop.Runtime.Utilities.SceneManagement;
using Object = UnityEngine.Object;
namespace Assets._Project.Develop.Runtime.Meta.Infrastructure
{
public class MainMenuContextRegistrations
{
public static void Process(DIContainer container)
{
container.RegisterAsSingle(CreateMainMenuUIRoot).NonLazy();
container.RegisterAsSingle(CreateMainMenuPresentersFactory);
container.RegisterAsSingle(CreateMainMenuScreenPresenter).NonLazy();
container.RegisterAsSingle(CreateMainMenuPopupService);
}
private static MainMenuPresentersFactory CreateMainMenuPresentersFactory(DIContainer c) => new(c);
private static MainMenuPopupService CreateMainMenuPopupService(DIContainer c)
{
return new MainMenuPopupService(
c.Resolve<ViewsFactory>(),
c.Resolve<ProjectPresentersFactory>(),
c.Resolve<MainMenuUIRoot>());
}
private static MainMenuUIRoot CreateMainMenuUIRoot(DIContainer c)
{
ResourcesAssetsLoader loader = c.Resolve<ResourcesAssetsLoader>();
MainMenuUIRoot uiRootPrefab = loader.Load<MainMenuUIRoot>(PathToResources.UI.Screens.MainMenu);
return Object.Instantiate(uiRootPrefab);
}
private static MainMenuScreenPresenter CreateMainMenuScreenPresenter(DIContainer c)
{
MainMenuUIRoot uiRoot = c.Resolve<MainMenuUIRoot>();
MainMenuScreenView view = c.Resolve<ViewsFactory>().Create<MainMenuScreenView>(uiRoot.HUDLayer);
MainMenuScreenPresenter presenter = c.Resolve<MainMenuPresentersFactory>().CreateMainMenuScreen(view);
return presenter;
}
}
}