Files
MinFt/Client/Assets/Scripts/UI/FishingTarget/FishingTargetPopupPanel4.cs
Liubing\LB 3d8d4d18f3 first commit
先修复一下,错误的场景

删除不必要的钓场资产

修复into场景

update:更新meta文件,修复报错

update:修复资源

修复第一章节建造

修复建造第三章

update:删除多余内容

update:更新README.md

update:还原图标

update:更新README

update:更新配置
2026-04-28 02:17:22 +08:00

53 lines
2.2 KiB
C#

using asap.core;
using cfg;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class FishingTargetPopupPanel4 : FishingTargetPopupPanelBase
{
TMP_Text text_num;
Image icon_target;
TMP_Text text_name;
TMP_Text text_catch;
GameObject text_nofound;
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>();
text_name = transform.Find("root/target_info/card_info/card_1/bg/info/text_name").GetComponent<TMP_Text>();
text_catch = transform.Find("root/target_info/card_info/card_1/bg/info/text_catch").GetComponent<TMP_Text>();
text_nofound = transform.Find("root/target_info/card_info/card_1/bg/info/text_nofound").gameObject;
base.Awake();
}
protected override void SetTargetExtra(string icon)
{
var tables = GContext.container.Resolve<Tables>();
GContext.container.Resolve<IUIService>().SetImageSprite(icon_target, icon);
EventTargetExtraDrop eventTargetExtraDrop = _fishingEventData.GetEventTargetExtraDrop();
if (eventTargetExtraDrop != null)
{
if (eventTargetExtraDrop is ETNewItem)
{
ETNewItem eTNewItem = eventTargetExtraDrop as ETNewItem;
int DropID = eTNewItem.ExtraDropList[0];
Drop drop = GContext.container.Resolve<Tables>().TbDrop[DropID];
text_num.text = $"+{drop.DropList.DropCountList[0]}";
var fishItemIDs = eTNewItem.NewItemID;
var fishItemID = fishItemIDs[0];
var fishItem = tables.TbItem[fishItemID];
int fishCount = _fishingEventData.GetEtDropAfterDropDic(fishItem.RedirectID);
text_name.text = LocalizationMgr.GetText(fishItem.Name_l10n_key) + ":";
text_catch.gameObject.SetActive(fishCount > 0);
text_catch.text = LocalizationMgr.GetFormatTextValue("UI_FishingTargetPopupPanel_Advanced_3", fishCount);
text_nofound.SetActive(fishCount == 0);
}
}
}
}