using System; using asap.core; using cfg; using TMPro; using UnityEngine; using UnityEngine.UI; using GameCore; namespace Event1v1Battle.Panel.InfoPanel { public class Event1v1BattleSlapInfoCell:MonoBehaviour { private TMP_Text text_info; private Image icon; private void Awake() { text_info = gameObject.FindChildGameObject("text_info").GetComponent(); icon = gameObject.FindChildGameObject("icon").GetComponent(); } public async void SetData(EventSlapSpinach data) { try { text_info.text = LocalizationMgr.GetFormatTextValue("UI_Event1v1BattleSlapPanel_12",1); var iconName = GContext.container.Resolve()?.GetItemIconName(data.FishItemID); await GContext.container.Resolve().SetImageSprite(icon, iconName); } catch (Exception e) { Debug.LogError(e); } } } }