备份CatanBuilding瘦身独立工程
This commit is contained in:
21
Assets/Scripts/UI/ShootingRange/ShootingRangeInfoPanel.cs
Normal file
21
Assets/Scripts/UI/ShootingRange/ShootingRangeInfoPanel.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using asap.core;
|
||||
using GameCore;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ShootingRangeInfoPanel : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Button btnClose;
|
||||
[SerializeField] private Image ammoIcon;
|
||||
[SerializeField] private TMP_Text textExplain;
|
||||
private EventShootingRangeData _data;
|
||||
private void Awake()
|
||||
{
|
||||
btnClose.onClick.AddListener(() => UIManager.Instance.DestroyUI(UITypes.ShootingRangeInfoPanel));
|
||||
_data = GContext.container.Resolve<EventShootingRangeData>();
|
||||
GContext.container.Resolve<IUIService>().SetImageSprite(ammoIcon, _data.AmmoIconUrl);
|
||||
textExplain.text =
|
||||
LocalizationMgr.GetFormatTextValue("UI_EventSandDigPanel_7", LocalizationMgr.GetText(_data.AmmoNameUrl));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user