40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class PCInfoUI_Center : UI3DModel
|
|
{
|
|
public TextMeshProUGUI[] texts; // 0 코스튬 이름, 1 코스튬 대사
|
|
public RawImage RawImage_costume;
|
|
|
|
PCInfoUI_PCListCard SelectCard;
|
|
|
|
public void Set(PCInfoUI_PCListCard choiceCard)
|
|
{
|
|
if (!DSUtil.CheckNull(SelectCard))
|
|
SelectCard.gos[0].SetActive(false);
|
|
|
|
SelectCard = choiceCard;
|
|
SelectCard.gos[0].SetActive(true);
|
|
|
|
SelectCard = choiceCard;
|
|
var costumeData = table_costumelist.Ins.Get_Data_orNull(SelectCard.Get_IntData());
|
|
RawImage_costume.enabled = false;
|
|
if (!DSUtil.CheckNull(costumeData))
|
|
{
|
|
AddrResourceMgr.Ins.LoadObject<Texture>($"Assets/Res_Addr/PCCostumeImage/{costumeData.s_Image}.png", handle =>
|
|
{
|
|
RawImage_costume.enabled = true;
|
|
RawImage_costume.texture = handle.Result;
|
|
Resources.UnloadUnusedAssets();
|
|
});
|
|
|
|
Set_3DModel($"Assets/Res_Addr/PC/{costumeData.s_Prefab}.prefab");
|
|
}
|
|
}
|
|
|
|
public void OnClick_EquipCostume()
|
|
{
|
|
ToastUI.Ins.Set(174, "코스튬 착용");
|
|
}
|
|
} |