先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
using asap.core;
|
|
using cfg;
|
|
using GameCore;
|
|
using TMPro;
|
|
|
|
public class EventReport : ReportBase
|
|
{
|
|
TMP_Text text_info;
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
text_info = transform.Find("info/text_info").GetComponent<TMP_Text>();
|
|
}
|
|
|
|
public void SetData(string playFabId, string content, ReportDataType reportDataType)
|
|
{
|
|
if (reportDataType == ReportDataType.Bomb)
|
|
{
|
|
text_info.text = LocalizationMgr.GetText("UI_HomePanel_101010");
|
|
|
|
}
|
|
else if (reportDataType == ReportDataType.Heist)
|
|
{
|
|
text_info.text = LocalizationMgr.GetFormatTextValue("UI_HomePanel_101009", content);
|
|
}
|
|
else if (reportDataType == ReportDataType.Aquarium)
|
|
{
|
|
string[] str = content.Split('#');
|
|
string aquariumId = "";
|
|
if (str.Length > 3 && int.TryParse(str[3], out int itemID))
|
|
{
|
|
Item fishItem = GContext.container.Resolve<Tables>().TbItem.GetOrDefault(itemID);
|
|
if (fishItem != null)
|
|
{
|
|
int q = fishItem.Quality;
|
|
if (q > 6) { q = 6; }
|
|
aquariumId = LocalizationMgr.GetText($"UI_FishingMapPanel_10101{q+1}");
|
|
}
|
|
}
|
|
if (str.Length > 4 && bool.TryParse(str[4], out bool result) && result)
|
|
{
|
|
text_info.text = LocalizationMgr.GetFormatTextValue("UI_EventReportPopupPanel_8", aquariumId);
|
|
}
|
|
else
|
|
text_info.text = LocalizationMgr.GetFormatTextValue("UI_EventReportPopupPanel_7", aquariumId);
|
|
}
|
|
Init(playFabId);
|
|
}
|
|
|
|
}
|