UI service frame
This commit is contained in:
1 parent
12a27f85c5
commit
e2d0974b3c
45 files changed
+1138
-927
No files matched your search
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Reflex.Core;
|
||||
using Reflex.Extensions;
|
||||
using Reflex.Injectors;
|
||||
@@ -49,11 +51,13 @@ namespace Code.Infrastructure.UI
|
||||
if(panel.InjectMeSenpai)
|
||||
GameObjectInjector.InjectRecursive(panel.gameObject, Container.RootContainer);
|
||||
// GameObjectInjector.InjectRecursive(panel.gameObject, SceneManager.GetActiveScene().GetSceneContainer()); // Скорее всего будут нужны компоненты текущей сцены
|
||||
|
||||
_eventBus.RaiseEvent<IUIPanelLoaded>(ui=> ui.UILoaded(panelType));
|
||||
}
|
||||
|
||||
public void TryRemovePanel(UIPanelType panelType)
|
||||
{
|
||||
//
|
||||
// TODO Close it
|
||||
RemovePanel(panelType);
|
||||
}
|
||||
|
||||
@@ -63,4 +67,8 @@ namespace Code.Infrastructure.UI
|
||||
_loadedPanels.Remove(panelType);
|
||||
}
|
||||
}
|
||||
public interface IUIPanelLoaded : IGlobalSubscriber
|
||||
{
|
||||
void UILoaded(UIPanelType uiPanelType);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user