코스튬 컬렉션

This commit is contained in:
Ino 2025-01-01 10:10:22 +09:00
parent f9b7af021d
commit c9e479e5bb
7 changed files with 56 additions and 9 deletions

View File

@ -45,4 +45,3 @@ classconfig 에 의해 정해짐
코스튬
- 컬렉션 스탯 적용
- 컬렉션 테이블

View File

@ -87,7 +87,7 @@ GameObject:
- component: {fileID: 7748470331826829342}
- component: {fileID: 8236965573256949005}
m_Layer: 5
m_Name: t_collectionName
m_Name: t_statvalue
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -488,6 +488,11 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Scroll: {fileID: 5398888955945469020}
texts:
- {fileID: 9010191918086728831}
- {fileID: 8236965573256949005}
gos:
- {fileID: 467474617955136873}
--- !u!114 &5398888955945469020
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -60,6 +60,7 @@ MonoBehaviour:
gos:
- {fileID: 1604959175147932502}
- {fileID: 8407263630244458775}
- {fileID: 8416760514361509726}
--- !u!1 &1604959175147932502
GameObject:
m_ObjectHideFlags: 0
@ -297,7 +298,7 @@ GameObject:
- component: {fileID: 8291890699385268835}
- component: {fileID: 3999760277351683312}
m_Layer: 5
m_Name: New Image
m_Name: status
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -36,6 +36,14 @@ public class PCCostumeCollectionListTableData : TableDataBase
}
public List<ObscuredInt> list_CostumeID = new List<ObscuredInt>();
public bool IsCollection(ServerData sdata)
{
for (int i = 0; i < list_CostumeID.Count; i++)
if (!sdata.IsObtainItem(list_CostumeID[i]))
return false;
return true;
}
}
public class table_pccostumecollectionlist : table_missionbase

View File

@ -1,9 +1,20 @@
using TMPro;
using UnityEngine;
public class PCInfoUI_CollectionCard : CardBase
{
public PCInfoUI_CollectionCard_Scroll m_Scroll;
public TextMeshProUGUI[] texts; // 0 이름, 1 능력치
public GameObject[] gos; // 0 잠금
public override void Set<T>(T _base)
{
base.Set(_base);
var data = _base as PCCostumeCollectionListTableData;
var sdata = ServerInfo.Ins.m_ServerData;
texts[0].text = table_localtext.Ins.Get_Text(data.n_CollectionName);
texts[1].text = MyText.Get_StatNameValueText(data.e_Stat, data.n_StatValue);
gos[0].SetActive(!data.IsCollection(sdata));
m_Scroll.Set(data.list_CostumeID);
}
}

View File

@ -1,4 +1,16 @@
using CodeStage.AntiCheat.ObscuredTypes;
using System.Collections.Generic;
public class PCInfoUI_CollectionCard_Scroll : uScrollViewMgr
{
List<ItemListTableData> list_pc = new List<ItemListTableData>();
public void Set(List<ObscuredInt> lst)
{
list_pc.Clear();
for (int i = 0; i < lst.Count; i++)
list_pc.Add(table_itemlist.Ins.Get_Data(lst[i]));
Set_ScrollView(list_pc);
list_CardBase.ForEach(f => f.Set_CardType(eUICardType.NoTouch));
}
}

View File

@ -4,9 +4,9 @@ using UnityEngine.UI;
public class PCInfoUI_PCListCard : CardBase
{
public Image[] images; // 0 얼굴
public TextMeshProUGUI[] texts; // 0 상태
public GameObject[] gos; // 0 선택, 1 미보유중
public Image[] images; // 0 얼굴
public TextMeshProUGUI[] texts; // 0 상태
public GameObject[] gos; // 0 선택, 1 미보유중, 2 상태
ItemListTableData m_Data;
@ -24,15 +24,26 @@ public class PCInfoUI_PCListCard : CardBase
string Get_Status(int equipid)
{
if (m_Data.n_ItemID == equipid)
return table_localtext.Ins.Get_Text(207); // 착용중
return table_localtext.Ins.Get_Text(207); // 착용중
return IsObtain() ? table_localtext.Ins.Get_Text(316) : table_localtext.Ins.Get_Text(208);
}
bool IsObtain() { return ServerInfo.Ins.m_ServerData.IsObtainItem(m_Data.n_ItemID); }
public override int Get_IntData() { return m_Data.n_ItemID; }
public override void Set_CardType(eUICardType _type)
{
base.Set_CardType(_type);
switch (_type)
{
case eUICardType.NoTouch:
gos[2].SetActive(false);
break;
}
}
public void OnClick_Costume()
{
PCInfoUI.Ins.m_PCInfoUI_Center.Set(false, this);
if (CardType != eUICardType.NoTouch)
PCInfoUI.Ins.m_PCInfoUI_Center.Set(false, this);
}
}