Интерфейс прокачан
This commit is contained in:
1 parent
ab9d444072
commit
0ac5ba1e1c
20 files changed
+2528
-89
No files matched your search
@@ -1,16 +1,18 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.UI
|
||||
{
|
||||
public class LoadingPanel : UIElement
|
||||
{
|
||||
[SerializeField] private Image _background;
|
||||
public void Hide()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
_background.enabled = false;
|
||||
}
|
||||
public void Show()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
_background.enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ namespace Code.UI
|
||||
|
||||
public void SwitchPanelTo(UIPanel uiPanel)
|
||||
{
|
||||
Object.Destroy(CurrentPanel);
|
||||
if(CurrentPanel) Object.Destroy(CurrentPanel.gameObject);
|
||||
|
||||
CurrentPanel = Object.Instantiate(_uiPanelsPrefabs[(int)uiPanel], _canvas.transform);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user