先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
57 lines
1.3 KiB
C#
57 lines
1.3 KiB
C#
using asap.core;
|
|
using cfg;
|
|
using GameCore;
|
|
using System;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class SignupRewardItem : MonoBehaviour
|
|
{
|
|
public TMP_Text text_num;
|
|
public GameObject num_bg;
|
|
public GameObject received;
|
|
public Button btn_click;
|
|
Action OnClickReward;
|
|
private void Awake()
|
|
{
|
|
|
|
text_num = transform.Find("text_progress").GetComponent<TMP_Text>();
|
|
num_bg = transform.Find("bg_progress").gameObject;
|
|
|
|
received = transform.Find("received").gameObject;
|
|
|
|
btn_click = GetComponent<Button>();
|
|
}
|
|
public void SetReceived(bool _isReceived)
|
|
{
|
|
text_num.gameObject.SetActive(!_isReceived);
|
|
num_bg.gameObject.SetActive(!_isReceived);
|
|
received.SetActive(_isReceived);
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
if (btn_click != null)
|
|
{
|
|
btn_click.onClick.AddListener(OnClick);
|
|
}
|
|
}
|
|
|
|
void OnClick()
|
|
{
|
|
OnClickReward();
|
|
//GContext.container.Resolve<PlayerItemData>().ShowItemTips(id, transform);
|
|
}
|
|
public void SetData(Action onClickReward, string num)
|
|
{
|
|
OnClickReward = onClickReward;
|
|
|
|
//GContext.container.Resolve<IUIService>().SetImageSprite(icon, _tables.GetItemIconName(id), BasePanel.PanelName);
|
|
|
|
text_num.text = num;
|
|
|
|
}
|
|
|
|
}
|