ИИ гонщиков, запуск, перезапуск игры и пр
This commit is contained in:
1 parent
f557c58c9d
commit
efcfaae647
48 files changed
+1486
-212
No files matched your search
@@ -43,13 +43,16 @@ namespace Code.Infrastructure.UI
|
||||
|
||||
public async UniTaskVoid LoadPanel(UIPanelType panelType)
|
||||
{
|
||||
var panel = (await Addressables.InstantiateAsync(_configs[panelType].Prefab, _canvas.transform).ToUniTask()).GetComponent<UIPanel>();
|
||||
var panel = (await Addressables.InstantiateAsync(_configs[panelType].Prefab, _canvas.transform).ToUniTask())
|
||||
.GetComponent<UIPanel>();
|
||||
|
||||
UnityEngine.Debug.LogWarning($"Panel loaded {panelType}");
|
||||
_eventBus.RaiseEvent<IUIPanelLoadedHandle>(ui => ui.UIPanelLoaded(panel, panelType));
|
||||
}
|
||||
|
||||
public void ReleasePanel(UIPanel panel)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning($"Panel released {panel.gameObject.name}");
|
||||
Addressables.ReleaseInstance(panel.gameObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user