코스튬 변경까지

This commit is contained in:
Ino 2024-12-31 15:30:12 +09:00
parent d20e9e346e
commit f6cf63b748
9 changed files with 46 additions and 20 deletions

View File

@ -39,9 +39,10 @@ classconfig 에 의해 정해짐
인게임 - 터레인 제외, 메시 베이커로 통째로 묶기
//로비 - 퍼펙트 컬링
전직 후 애니메이션 변경
어드레서블 다운로드 % 정상적으로 나오게 수정
코스튬
- 코스튬 세트
- 캐릭터 세팅 함수 만들기 (wizardactor 추가, 실드, 오른손 무기 부모 오브젝트) - 이 세팅은 직업 추가마다 필요
// - 코스튬마다 PC프리팹 생성(메시 동적 로딩 시 렌더링이 안됨)
- 코스튬 변경 (테스트용으로 코스튬 3종 지급)

View File

@ -1,12 +1,10 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.ResourceManagement.AsyncOperations;
public class PCInfo : MonoBehaviourSingletonTemplate<PCInfo>
{
public void Make_Actors(bool _IsEnemy, ServerData sdata)
public void Make_Actors(bool _IsEnemy, ServerData sdata, bool startcam = false)
{
var curMapData = MyValue.MyChoiceMapData;
@ -23,6 +21,7 @@ public class PCInfo : MonoBehaviourSingletonTemplate<PCInfo>
AddrResourceMgr.Ins.Set_AddressableReleaseSelf(pc.gameObject);
pc.Set(_IsEnemy, null, sdata, pcid, true);
pc.Set_MyPet(null);
if (startcam) (pc as PCActor).StartCam();
ActorInfo.Ins.Add_Actor(pc, _IsEnemy ? eRole.EnemyPC : eRole.PC, 0, costumetable.s_Prefab);
var chapter = curMapData.n_MapID;

View File

@ -139,6 +139,9 @@ public partial class ServerData
Equip.Set_Equip(eItem.Skill, 702008, 4);
Equip.Set_Equip(eItem.Skill, 703502, 5);
Add_Item(110001, 1);
Add_Item(110002, 1);
Add_Item(110003, 1);
Add_Item(1, 10000);
Add_Item(101, 10000);
Add_Item(10001, 1000);

View File

@ -1,7 +1,3 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Menu_Pet : MenuBase
{
public override void OnClick_Back()
@ -9,6 +5,8 @@ public class Menu_Pet : MenuBase
base.OnClick_Back();
GameUI.Ins.Clear_newItem(eItem.Pet);
GameUI.Ins.LobbyUI.Set_Noti();
ActorInfo.Ins.Destroy_Mobs();
PCInfo.Ins.Make_Actors(false, ServerInfo.Ins.m_ServerData);
}
}

View File

@ -12,6 +12,11 @@ public class PCInfoUI : PCUIMenu
base.Set();
NewGameUI.Ins.m_PCUI.Set_Money(1, 2);
m_PCInfoUI_Left.Set();
m_PCInfoUI_List.Set(0); // m_PCInfoUI_Center 는 여기서 세팅
Set_UI(true);
}
public void Set_UI(bool enter)
{
m_PCInfoUI_List.Set(enter, 0); // m_PCInfoUI_Center 는 여기서 세팅
}
}

View File

@ -10,10 +10,12 @@ public class PCInfoUI_Center : UI3DModel
public RawImage RawImage_costume;
public GameObject[] gos; // 0 코스튬 착용 버튼
public int CostumeIdWhenEnter;
PCInfoUI_PCListCard SelectCard;
AsyncOperationHandle<Texture> currentHandle;
public void Set(PCInfoUI_PCListCard choiceCard)
public void Set(bool enter, PCInfoUI_PCListCard choiceCard)
{
if (!DSUtil.CheckNull(SelectCard))
SelectCard.gos[0].SetActive(false);
@ -21,7 +23,8 @@ public class PCInfoUI_Center : UI3DModel
SelectCard = choiceCard;
SelectCard.gos[0].SetActive(true);
SelectCard = choiceCard;
if (enter) CostumeIdWhenEnter = choiceCard.Get_IntData();
var costumeid = SelectCard.Get_IntData();
var costumeData = table_costumelist.Ins.Get_Data_orNull(costumeid);
RawImage_costume.enabled = false;
@ -60,6 +63,6 @@ public class PCInfoUI_Center : UI3DModel
if (!CanEquip()) return;
var sdata = ServerInfo.Ins.m_ServerData;
sdata.Equip.Set_Equip(eItem.PCCostume, SelectCard.Get_IntData());
PCInfoUI.Ins.Set();
PCInfoUI.Ins.Set_UI(false);
}
}

View File

@ -1,10 +1,20 @@
public class PCInfoUI_List : uScrollViewMgr
{
public override void Set(int index)
public void Set(bool enter, int index)
{
var lst = table_itemlist.Ins.Get_DataList(eItem.PCCostume);
Set_ScrollView(lst);
PCInfoUI.Ins.m_PCInfoUI_Center.Set(list_CardBase[0] as PCInfoUI_PCListCard);
var equipid = ServerInfo.Ins.m_ServerData.Get_EqiupmentEquip(eItem.PCCostume);
PCInfoUI_PCListCard equipcard = list_CardBase[0] as PCInfoUI_PCListCard;
for (int i = 0; i < list_CardBase.Count; i++)
{
if (list_CardBase[i].Get_IntData() == equipid)
{
equipcard = list_CardBase[i] as PCInfoUI_PCListCard;
break;
}
}
PCInfoUI.Ins.m_PCInfoUI_Center.Set(enter, equipcard);
}
}

View File

@ -33,6 +33,6 @@ public class PCInfoUI_PCListCard : CardBase
public void OnClick_Costume()
{
PCInfoUI.Ins.m_PCInfoUI_Center.Set(this);
PCInfoUI.Ins.m_PCInfoUI_Center.Set(false, this);
}
}

View File

@ -1,7 +1,3 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PCUI : BotMenuBase
{
public PCUIMenu[] m_PCMenu; // 0 정보
@ -18,4 +14,15 @@ public class PCUI : BotMenuBase
m_PCMenu[i].Off();
m_PCMenu[index].Set();
}
public override void OnClick_Back()
{
base.OnClick_Back();
var sdata = ServerInfo.Ins.m_ServerData;
if (PCInfoUI.Ins.m_PCInfoUI_Center.CostumeIdWhenEnter != sdata.Get_EqiupmentEquip(eItem.PCCostume))
{
ActorInfo.Ins.Destroy_Mobs();
PCInfo.Ins.Make_Actors(false, ServerInfo.Ins.m_ServerData, true);
}
}
}