Merge remote-tracking branch 'origin/main' into work_branch
# Conflicts: # Assets/Darkmatter/Code/Features/MainMenu/Mascot/MainmenuPresenter.cs # Assets/Darkmatter/Code/Features/MainMenu/Mascot/MainmenuPresenter.cs.meta # Assets/Darkmatter/Code/Features/MainMenu/Mascot/MainmenuView.cs # Assets/Darkmatter/Code/Features/MainMenu/Mascot/MainmenuView.cs.meta # Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuPresenter.cs # Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuPresenter.cs.meta # Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuView.cs # Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuView.cs.meta # Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuPresenter.cs # Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuPresenter.cs.meta # Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuView.cs # Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuView.cs.meta
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7d1320ac2ff4ba4ae4bff41efa01e29
|
||||
timeCreated: 1779959661
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Darkmatter.Core.Data.Signals.Features.AppBoot;
|
||||
|
||||
public record struct IntroCompletedSignal();
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a44d51add9914de6bc28b428e13aaecb
|
||||
timeCreated: 1779959670
|
||||
@@ -4,6 +4,7 @@
|
||||
"references": [
|
||||
"GUID:6a0a834eb41764f12ba55c3fb04a40cb",
|
||||
"GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1",
|
||||
"GUID:b4c9f7fbf1e144933a1797dc208ece5f",
|
||||
"GUID:b0214a6008ed146ff8f122a6a9c2f6cc",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23"
|
||||
],
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Darkmatter.Core.Contracts.Features.Progression;
|
||||
using Darkmatter.Core.Contracts.Services.Scenes;
|
||||
using Darkmatter.Core.Data.Signals.Features.AppBoot;
|
||||
using Darkmatter.Core.Enums.Services.Scenes;
|
||||
using Darkmatter.Features.AppBoot.SceneRefs;
|
||||
using Darkmatter.Libs.Observer;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Video;
|
||||
using VContainer.Unity;
|
||||
@@ -13,11 +16,13 @@ namespace Darkmatter.Features.AppBoot.Flow
|
||||
{
|
||||
private readonly AppBootSceneRefs _sceneRefs;
|
||||
private readonly ISceneService _sceneService;
|
||||
private readonly IEventBus _eventBus;
|
||||
|
||||
public AppBootFlow(AppBootSceneRefs sceneRefs, ISceneService sceneService)
|
||||
public AppBootFlow(AppBootSceneRefs sceneRefs, ISceneService sceneService, IEventBus eventBus)
|
||||
{
|
||||
_sceneRefs = sceneRefs;
|
||||
_sceneService = sceneService;
|
||||
_eventBus = eventBus;
|
||||
}
|
||||
|
||||
public async UniTask StartAsync(CancellationToken cancellation = default)
|
||||
@@ -33,7 +38,7 @@ namespace Darkmatter.Features.AppBoot.Flow
|
||||
|
||||
player.loopPointReached += OnDone;
|
||||
player.Play();
|
||||
await _sceneService.LoadSceneAsync(GameScene.MainMenu, null, cancellation);
|
||||
await _sceneService.LoadSceneAsync(nameof(GameScene.MainMenu), null, cancellation);
|
||||
|
||||
await tcs.Task.AttachExternalCancellation(cancellation);
|
||||
|
||||
@@ -44,6 +49,7 @@ namespace Darkmatter.Features.AppBoot.Flow
|
||||
if (_sceneRefs.IntroCanvas != null)
|
||||
Object.Destroy(_sceneRefs.IntroCanvas.gameObject);
|
||||
Object.Destroy(player.gameObject);
|
||||
_eventBus.Publish(new IntroCompletedSignal());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,12 @@ namespace Darkmatter.Features.Mainmenu
|
||||
{
|
||||
public class MainmenuFeatureModule: MonoBehaviour, IModule
|
||||
{
|
||||
[SerializeField] private MainmenuView mainmenuView;
|
||||
[SerializeField] private MainMenuView mainMenuView;
|
||||
public void Register(IContainerBuilder builder)
|
||||
{
|
||||
if(mainmenuView!= null)
|
||||
if(mainMenuView!= null)
|
||||
{
|
||||
builder.RegisterEntryPoint<MainmenuPresenter>().WithParameter(mainmenuView);
|
||||
builder.RegisterEntryPoint<MainMenuPresenter>().WithParameter(mainMenuView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,18 @@ using VContainer.Unity;
|
||||
|
||||
namespace Darkmatter.Features.Mainmenu
|
||||
{
|
||||
public class MainmenuPresenter : IStartable, IDisposable
|
||||
public class MainMenuPresenter : IStartable, IDisposable
|
||||
{
|
||||
<<<<<<<< HEAD:Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuPresenter.cs
|
||||
private readonly MainmenuView _view;
|
||||
private readonly IEventBus _eventBus;
|
||||
|
||||
public MainmenuPresenter(MainmenuView view, IEventBus eventBus)
|
||||
========
|
||||
private readonly MainMenuView _view;
|
||||
|
||||
public MainMenuPresenter(MainMenuView view)
|
||||
>>>>>>>> origin/main:Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuPresenter.cs
|
||||
{
|
||||
_view = view;
|
||||
_eventBus = eventBus;
|
||||
@@ -7,7 +7,7 @@ using UnityEngine.UI;
|
||||
|
||||
namespace Darkmatter.Features.Mainmenu
|
||||
{
|
||||
public class MainmenuView : MonoBehaviour
|
||||
public class MainMenuView : MonoBehaviour
|
||||
{
|
||||
[Header("UI Elements")]
|
||||
[SerializeField] private Button playBtn;
|
||||
8
Assets/Darkmatter/Code/Libs/Observer/Installers.meta
Normal file
8
Assets/Darkmatter/Code/Libs/Observer/Installers.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56c469bea638b43dc96015d33d220a8f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
using Darkmatter.Libs.Installers;
|
||||
using UnityEngine;
|
||||
using VContainer;
|
||||
|
||||
namespace Darkmatter.Libs.Observer
|
||||
{
|
||||
public class ObserverLibraryModule : MonoBehaviour, IModule
|
||||
{
|
||||
public void Register(IContainerBuilder builder)
|
||||
{
|
||||
builder.Register<IEventBus, EventBus>(Lifetime.Singleton);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa2c71d11c78f4c16a545758585358bf
|
||||
@@ -2,7 +2,8 @@
|
||||
"name": "Libs.Observer",
|
||||
"rootNamespace": "Darkmatter.Libs.Observer",
|
||||
"references": [
|
||||
"VContainer"
|
||||
"VContainer",
|
||||
"Libs.Installers"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
8
Assets/Darkmatter/Code/Libs/Observer/Systems.meta
Normal file
8
Assets/Darkmatter/Code/Libs/Observer/Systems.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1526335c9abe4f65b4c4d0da98cd44a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user