48 lines
1.0 KiB
C#
48 lines
1.0 KiB
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using TMPro;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
public class ListItem : MonoBehaviour
|
|||
|
{
|
|||
|
public int list;
|
|||
|
public TextMeshProUGUI listText;//<2F><><EFBFBD><EFBFBD>
|
|||
|
public Image listImage;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼƬ
|
|||
|
public Image headImage;//ͷ<><CDB7>
|
|||
|
public TextMeshProUGUI nameText;//<2F><><EFBFBD><EFBFBD>
|
|||
|
public TextMeshProUGUI numText;//<2F><>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
public Image Bg;//<2F><><EFBFBD><EFBFBD>ͼƬ
|
|||
|
|
|||
|
void Start()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public void SetListImage()//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|||
|
{
|
|||
|
if (list == 1)
|
|||
|
{
|
|||
|
listImage.sprite = Resources.Load<Sprite>("bgYello");
|
|||
|
}
|
|||
|
else if (list == 2)
|
|||
|
{
|
|||
|
listImage.sprite = Resources.Load<Sprite>("bgGreen");
|
|||
|
}
|
|||
|
else if (list == 3)
|
|||
|
{
|
|||
|
listImage.sprite = Resources.Load<Sprite>("bgBlue");
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
listImage.sprite = Resources.Load<Sprite>("bgred");
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
public void ListBgImage()//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|||
|
{
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|