(client) feat:添加游玩时UI相关贴图,添加3d模型场景按钮,添加多级调色进度条,添加SVG图片包,添加事件定义以及管理器,添加音频管理器,定义部分怪物,添加通信协议定义;fix:修复维度切换错误,修复LogUI显示不正确 (#55)
Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com> Reviewed-on: #55
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
using System;
|
||||
using Base;
|
||||
using Map;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI
|
||||
@ -6,7 +10,13 @@ namespace UI
|
||||
{
|
||||
[SerializeField] private BarUI focusedEntityHP;
|
||||
[SerializeField] private BarUI lastEntityHP;
|
||||
|
||||
[SerializeField] private BarUI BaseBuildingHP;
|
||||
[SerializeField] private MiniMap miniMap;
|
||||
[SerializeField] private EquipmentUI equipmentUI;
|
||||
[SerializeField] private CoinCountUI coinCountUI;
|
||||
[SerializeField] private BuffIconListUI focuseEntityBuffIconList;
|
||||
[SerializeField] private BuffIconListUI lastEntityBuffIconList;
|
||||
[SerializeField] private AttackModeUI attackMode;
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
@ -18,5 +28,52 @@ namespace UI
|
||||
}
|
||||
}
|
||||
|
||||
public void Show()
|
||||
{
|
||||
focusedEntityHP.gameObject.SetActive(true);
|
||||
lastEntityHP.gameObject.SetActive(true);
|
||||
BaseBuildingHP.gameObject.SetActive(true);
|
||||
miniMap.gameObject.SetActive(true);
|
||||
equipmentUI.gameObject.SetActive(true);
|
||||
coinCountUI.gameObject.SetActive(true);
|
||||
focuseEntityBuffIconList.gameObject.SetActive(true);
|
||||
lastEntityBuffIconList.gameObject.SetActive(true);
|
||||
attackMode.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
focusedEntityHP.gameObject.SetActive(false);
|
||||
lastEntityHP.gameObject.SetActive(false);
|
||||
BaseBuildingHP.gameObject.SetActive(false);
|
||||
miniMap.gameObject.SetActive(false);
|
||||
equipmentUI.gameObject.SetActive(false);
|
||||
coinCountUI.gameObject.SetActive(false);
|
||||
focuseEntityBuffIconList.gameObject.SetActive(false);
|
||||
lastEntityBuffIconList.gameObject.SetActive(false);
|
||||
attackMode.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
UIInputControl.Instance.OnWindowVisibilityChanged += UIChange;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
UIInputControl.Instance.OnWindowVisibilityChanged -= UIChange;
|
||||
}
|
||||
|
||||
private void UIChange(UIBase ui, bool open)
|
||||
{
|
||||
if (ui.exclusive && open)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user