先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using asap.core;
|
|
using cfg;
|
|
using game;
|
|
using GameCore;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class FeaturesUnlock : MonoBehaviour
|
|
{
|
|
public Button btnClose;
|
|
public int id;
|
|
public Image icon;
|
|
TMP_Text text_name;
|
|
private void Awake()
|
|
{
|
|
text_name = transform.Find("bg_info/text_info").GetComponent<TMP_Text>();
|
|
btnClose = transform.Find("reward/btn_receive/btn_green").GetComponent<Button>();
|
|
icon = transform.Find("icon").GetComponent<Image>();
|
|
|
|
}
|
|
private void Start()
|
|
{
|
|
btnClose.onClick.AddListener(OnClickClose);
|
|
}
|
|
public void ShowPanel()
|
|
{
|
|
var account = GContext.container.Resolve<Tables>().TbAccount.GetOrDefault(id);
|
|
if (account != null)
|
|
{
|
|
text_name.text = LocalizationMgr.GetText(account.Title_l10n_key);
|
|
GContext.container.Resolve<IUIService>().SetImageSprite(icon, account.Img, BasePanel.PanelName);
|
|
}
|
|
else
|
|
{
|
|
OnClickClose();
|
|
}
|
|
}
|
|
void OnClickClose()
|
|
{
|
|
GContext.Publish(new ShowData(RewardType.Destroy));
|
|
}
|
|
}
|