2024-11-20 02:41:39 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class HistoryPanel : BasePanel
|
|
|
|
|
{
|
|
|
|
|
public Button returnBtn;
|
|
|
|
|
public List<HistoryItem> KillTimesList;//100<30>λ<EFBFBD>ɱͳ<C9B1><CDB3>
|
|
|
|
|
public GameObject historyItemPre;//<2F><>ƷԤ<C6B7><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public Transform ItemPreGrid;//Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɺ<EFBFBD><C9BA>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public List<GameObject> ItemList;
|
2024-11-25 14:37:44 +08:00
|
|
|
|
|
|
|
|
|
public TextMeshProUGUI throwEggText;//Ͷ<><CDB6><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
public TextMeshProUGUI getEggText;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
|
|
|
|
|
public GameObject SelfHistroyPanel;
|
2024-11-20 02:41:39 +08:00
|
|
|
|
public override void Start()
|
|
|
|
|
{
|
|
|
|
|
base.Start();
|
|
|
|
|
returnBtn.onClick.AddListener(OnClickReBtn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnClickReBtn()
|
|
|
|
|
{
|
|
|
|
|
HidePanel();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetKilledText(gameEscapeRoomKillCountResponseVo gameKill)//<2F><>100<30>α<EFBFBD>ɱ<EFBFBD><C9B1>¼<EFBFBD><C2BC><EFBFBD>ı<EFBFBD><C4B1>ķ<DEB8><C4B7><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
for (int i=0;i<KillTimesList.Count;i++)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (KillTimesList[i].roomNo == gameKill.roomNo)
|
|
|
|
|
{
|
|
|
|
|
KillTimesList[i].TextPro.text = gameKill.kill+"<22><>";//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void SetKillHouse(gameEscapeModel gameEscapeModelList)//<2F><>¼<EFBFBD><C2BC>10<31>α<EFBFBD><CEB1><EFBFBD>ɱ<EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
string[] parts = gameEscapeModelList.roomNoKill.Split(","); // <20><><EFBFBD><EFBFBD> ',' <20>ָ<EFBFBD><D6B8>ַ<EFBFBD><D6B7><EFBFBD>d
|
2024-11-25 14:37:44 +08:00
|
|
|
|
|
2024-11-20 02:41:39 +08:00
|
|
|
|
Debug.Log("jiijojjiijjiijijij" + gameEscapeModelList.roomNoKill+"---------------");
|
|
|
|
|
foreach (string part in parts)
|
|
|
|
|
{
|
|
|
|
|
foreach (HistoryItem item in KillTimesList)
|
|
|
|
|
{
|
|
|
|
|
if (item.roomNo==int.Parse(part))
|
|
|
|
|
{
|
|
|
|
|
historyItemPre.GetComponent<HistoryItem>().nameTextPro.text = item.nameTextPro.text;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-11-25 14:37:44 +08:00
|
|
|
|
historyItemPre.GetComponent<HistoryItem>().TextPro.text = gameEscapeModelList.gameNo+"<22><>";//<2F>ں<EFBFBD>
|
2024-11-20 02:41:39 +08:00
|
|
|
|
historyItemPre.GetComponent<HistoryItem>().image.sprite=item.sprite;//<2F><><EFBFBD><EFBFBD>ͼƬ
|
|
|
|
|
|
|
|
|
|
if (ItemList.Count>10)
|
|
|
|
|
{
|
|
|
|
|
for (int i=0;i<10;i++)
|
|
|
|
|
{
|
|
|
|
|
Destroy(ItemList[i]);
|
|
|
|
|
ItemList.Remove(ItemList[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
ItemList.Add(Instantiate(historyItemPre, ItemPreGrid));
|
|
|
|
|
//break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|