30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using asap.core;
|
|
using cfg;
|
|
using TMPro;
|
|
using UnityEngine.UI;
|
|
|
|
public class FishingTargetPopupPanelChangeMaterial : FishingTargetPopupPanelBase
|
|
{
|
|
TMP_Text text_num;
|
|
Image icon_target;
|
|
protected override void Awake()
|
|
{
|
|
text_num = transform.Find("root/target_info/info/text_num").GetComponent<TMP_Text>();
|
|
icon_target = transform.Find("root/target_info/info/text_num/icon_target").GetComponent<Image>();
|
|
base.Awake();
|
|
}
|
|
protected override void SetTargetExtra(string icon)
|
|
{
|
|
GContext.container.Resolve<IUIService>().SetImageSprite(icon_target, icon);
|
|
EventTargetExtraDrop eventTargetExtraDrop = _fishingEventData.GetEventTargetExtraDrop();
|
|
if (eventTargetExtraDrop != null)
|
|
{
|
|
if (eventTargetExtraDrop is ETDropAfterDrop)
|
|
{
|
|
int DropID = (eventTargetExtraDrop as ETDropAfterDrop).ExtraDropList[0];
|
|
Drop drop = GContext.container.Resolve<Tables>().TbDrop[DropID];
|
|
text_num.text = $"+{drop.DropList.DropCountList[0]}";
|
|
}
|
|
}
|
|
}
|
|
} |