장비 메인 능력치 제외 완료
This commit is contained in:
parent
ac9c64e739
commit
c28267d8c3
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,26 @@
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class EqiupmentPCInfo : UI3DModel
|
||||||
|
{
|
||||||
|
public Image[] images; // 0 메인스탯
|
||||||
|
public TextMeshProUGUI[] texts; // 0 직업, 1 레벨, 2 이름, 3 메인스탯, 4 공격타입(물리/근접)
|
||||||
|
|
||||||
|
public void Set()
|
||||||
|
{
|
||||||
|
var costumeid = ServerInfo.Ins.m_ServerData.Get_EqiupmentEquip(eItem.PCCostume);
|
||||||
|
var costumedata = table_costumelist.Ins.Get_Data_orNull(costumeid);
|
||||||
|
Set_2DIlust(costumedata);
|
||||||
|
Set_3DModel(costumedata.s_Prefab, tr => { tr.GetComponent<PCActor>().Set_Obj(); });
|
||||||
|
|
||||||
|
var sdata = ServerInfo.Ins.m_ServerData;
|
||||||
|
var classData = table_classconfig.Ins.Get_Data_orNull(sdata.Get_EqiupmentEquip(eItem.PC));
|
||||||
|
texts[0].text = classData.Get_JobName();
|
||||||
|
texts[1].text = $"Lv. {sdata.PC.Lv}";
|
||||||
|
texts[2].text = ServerInfo.Ins.UserName;
|
||||||
|
texts[3].text = classData.e_MainStatType.ToString();
|
||||||
|
texts[4].text = classData.e_BattleType.ToString();
|
||||||
|
|
||||||
|
images[0].sprite = UIAtlasMgr.Ins.Get_MainStatSprite(classData.e_MainStatType, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 60085aae576ebe845bdd24afc2440cd6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -5,6 +5,7 @@ using UnityEngine;
|
||||||
public class EquipmentUI : BotMenuBase
|
public class EquipmentUI : BotMenuBase
|
||||||
{
|
{
|
||||||
public TabUIBase m_Tab;
|
public TabUIBase m_Tab;
|
||||||
|
public EqiupmentPCInfo m_EqiupmentPCInfo;
|
||||||
public EquipmentUI_EquipItems m_equipItems; // 중앙 착용 중인 6개의 아이템
|
public EquipmentUI_EquipItems m_equipItems; // 중앙 착용 중인 6개의 아이템
|
||||||
public EquipmentUI_Items m_EquipmentUI_Items; // 우측 아이템 도감
|
public EquipmentUI_Items m_EquipmentUI_Items; // 우측 아이템 도감
|
||||||
public EquipmentUI_Enchant m_EquipmentUI_Enchant; // 우측 인챈트 리스트
|
public EquipmentUI_Enchant m_EquipmentUI_Enchant; // 우측 인챈트 리스트
|
||||||
|
|
@ -23,6 +24,7 @@ public class EquipmentUI : BotMenuBase
|
||||||
{
|
{
|
||||||
base.Set();
|
base.Set();
|
||||||
Set_Money(101, 102, 103);
|
Set_Money(101, 102, 103);
|
||||||
|
m_EqiupmentPCInfo.Set();
|
||||||
m_equipItems.Set();
|
m_equipItems.Set();
|
||||||
for (int i = 0; i < list_tabData.Count; i++)
|
for (int i = 0; i < list_tabData.Count; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,16 @@
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.AddressableAssets;
|
|
||||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
public class PCInfoUI_Center : UI3DModel
|
public class PCInfoUI_Center : UI3DModel
|
||||||
{
|
{
|
||||||
public PetCard m_MyPet;
|
public PetCard m_MyPet;
|
||||||
public TextMeshProUGUI[] texts; // 0 코스튬 이름, 1 코스튬 대사
|
public TextMeshProUGUI[] texts; // 0 코스튬 이름, 1 코스튬 대사
|
||||||
public RawImage RawImage_costume;
|
|
||||||
public GameObject[] gos; // 0 코스튬 착용 버튼
|
public GameObject[] gos; // 0 코스튬 착용 버튼
|
||||||
|
|
||||||
public int CostumeIdWhenEnter;
|
public int CostumeIdWhenEnter;
|
||||||
public bool firstInit = false;
|
public bool firstInit = false;
|
||||||
|
|
||||||
PCInfoUI_PCListCard SelectCard;
|
PCInfoUI_PCListCard SelectCard;
|
||||||
AsyncOperationHandle<Texture> currentHandle;
|
|
||||||
|
|
||||||
public void Set(PCInfoUI_PCListCard choiceCard)
|
public void Set(PCInfoUI_PCListCard choiceCard)
|
||||||
{
|
{
|
||||||
|
|
@ -37,27 +32,9 @@ public class PCInfoUI_Center : UI3DModel
|
||||||
|
|
||||||
var costumeid = SelectCard.Get_IntData();
|
var costumeid = SelectCard.Get_IntData();
|
||||||
var costumeData = table_costumelist.Ins.Get_Data_orNull(costumeid);
|
var costumeData = table_costumelist.Ins.Get_Data_orNull(costumeid);
|
||||||
|
Set_2DIlust(costumeData);
|
||||||
|
Set_3DModel(costumeData.s_Prefab, tr => { tr.GetComponent<PCActor>().Set_Obj(); });
|
||||||
RawImage_costume.enabled = false;
|
RawImage_costume.enabled = false;
|
||||||
if (!DSUtil.CheckNull(costumeData))
|
|
||||||
{
|
|
||||||
AddrResourceMgr.Ins.LoadObject<Texture>($"Assets/Res_Addr/PCCostumeImage/{costumeData.s_Image}.png", handle =>
|
|
||||||
{
|
|
||||||
if (currentHandle.IsValid())
|
|
||||||
{
|
|
||||||
Addressables.Release(currentHandle);
|
|
||||||
RawImage_costume.texture = null; // 기존 Texture 참조 해제
|
|
||||||
}
|
|
||||||
|
|
||||||
currentHandle = handle;
|
|
||||||
RawImage_costume.enabled = true;
|
|
||||||
RawImage_costume.texture = handle.Result;
|
|
||||||
});
|
|
||||||
|
|
||||||
Set_3DModel($"Assets/Res_Addr/PC/{costumeData.s_Prefab}.prefab", tr =>
|
|
||||||
{
|
|
||||||
tr.GetComponent<PCActor>().Set_Obj();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
gos[0].SetActive(CanEquip());
|
gos[0].SetActive(CanEquip());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,42 @@
|
||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.AddressableAssets;
|
||||||
using UnityEngine.AI;
|
using UnityEngine.AI;
|
||||||
|
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class UI3DModel : MonoBehaviour
|
public class UI3DModel : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public RawImage RawImage_costume;
|
||||||
public Transform tf_model;
|
public Transform tf_model;
|
||||||
|
|
||||||
|
AsyncOperationHandle<Texture> currentHandle;
|
||||||
|
|
||||||
|
protected void Set_2DIlust(CostumeListTableData costumeData)
|
||||||
|
{
|
||||||
|
if (!DSUtil.CheckNull(costumeData))
|
||||||
|
{
|
||||||
|
AddrResourceMgr.Ins.LoadObject<Texture>($"Assets/Res_Addr/PCCostumeImage/{costumeData.s_Image}.png", handle =>
|
||||||
|
{
|
||||||
|
if (currentHandle.IsValid())
|
||||||
|
{
|
||||||
|
Addressables.Release(currentHandle);
|
||||||
|
RawImage_costume.texture = null; // 기존 Texture 참조 해제
|
||||||
|
}
|
||||||
|
|
||||||
|
currentHandle = handle;
|
||||||
|
RawImage_costume.enabled = true;
|
||||||
|
RawImage_costume.texture = handle.Result;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void Set_3DModel(string prefab, Action<Transform> act = null)
|
protected void Set_3DModel(string prefab, Action<Transform> act = null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < tf_model.childCount; i++)
|
for (int i = 0; i < tf_model.childCount; i++)
|
||||||
Destroy(tf_model.GetChild(i).gameObject);
|
Destroy(tf_model.GetChild(i).gameObject);
|
||||||
|
|
||||||
AddrResourceMgr.Ins.LoadObject<GameObject>(prefab, handle =>
|
AddrResourceMgr.Ins.LoadObject<GameObject>($"Assets/Res_Addr/PC/{prefab}.prefab", handle =>
|
||||||
{
|
{
|
||||||
var go = DSUtil.Get_Clone(handle.Result, tf_model);
|
var go = DSUtil.Get_Clone(handle.Result, tf_model);
|
||||||
if (DSUtil.CheckNull(go.GetComponent<AddressableReleaseSelf>()))
|
if (DSUtil.CheckNull(go.GetComponent<AddressableReleaseSelf>()))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue