88 lines
3.3 KiB
C#
88 lines
3.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PresetUI : LobbyNonMenuBase
|
|
{
|
|
public DeckTabUI m_DeckTabUI;
|
|
public UISprite[] sprites; // 0 마녀 얼굴
|
|
public UIGrid grid_pet, grid_magic;
|
|
|
|
List<UIItemCard> list_equipment = new List<UIItemCard>();
|
|
List<UIItemCard> list_pet = new List<UIItemCard>();
|
|
List<UIItemCard> list_magic = new List<UIItemCard>();
|
|
|
|
int m_Chapter;
|
|
|
|
public override void Set(int _chapter)
|
|
{
|
|
base.Set(_chapter);
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
m_Chapter = _chapter;
|
|
if (m_Chapter < 101)
|
|
m_Chapter = 1;
|
|
m_DeckTabUI.Set(m_Chapter, Set_UI, true);
|
|
}
|
|
|
|
void Set_UI()
|
|
{
|
|
//var sdata = ServerInfo.Ins.m_ServerData;
|
|
//var equiplst = sdata.Equip.Get_Preset_byPrest(m_DeckTabUI.Get_Tab());
|
|
//// 마녀 얼굴
|
|
//sprites[0].spriteName = DSUtil.Get_ItemSpriteInfo(eItem.PC, equiplst.Equip[eItem.PC]).Icon;
|
|
|
|
// 지팡이 ~ 요정
|
|
//for (int i = 0; i < equiplst.EquipMentEquip.Count - 2; i++) // 아직 무기 코스튬 없음
|
|
// Make_Card(list_equipment, i, eItem.Weapon + i, equiplst.EquipMentEquip[i + 1], m_grid.transform);
|
|
//m_grid.repositionNow = true;
|
|
|
|
//// 펫
|
|
//for (int i = 0; i < equiplst.PetEquip.Count; i++)
|
|
// Make_Card(list_pet, i, eItem.Pet, equiplst.PetEquip[i], grid_pet.transform);
|
|
//grid_pet.repositionNow = true;
|
|
|
|
//// 마법
|
|
//for (int i = 0; i < equiplst.Magic.Count; i++)
|
|
// Make_Card(list_magic, i, eItem.Magic, equiplst.Magic[i], grid_magic.transform);
|
|
//grid_magic.repositionNow = true;
|
|
}
|
|
void Make_Card(List<UIItemCard> lst, int i, eItem item, int id, Transform _parent)
|
|
{
|
|
if (lst.Count <= i) lst.Add(DSUtil.Get_Clone<UIItemCard>(go_card, _parent));
|
|
lst[i].Set(new ItemData(item, id, 0, "", eUICardType.DetailInfo));
|
|
}
|
|
|
|
//public void OnClick_Change(GameObject _go)
|
|
//{
|
|
// OnClick_Back();
|
|
// switch (_go.name)
|
|
// {
|
|
// case "Costume":
|
|
// GameUI.Ins.LobbyUI.Get_MenuWitch().Set_Tab(1);
|
|
// break;
|
|
// case "Equipment":
|
|
// GameUI.Ins.LobbyUI.Get_MenuEquipment().Set();
|
|
// break;
|
|
// case "Pet":
|
|
// GameUI.Ins.LobbyUI.Get_MenuPet().gos_contents[0].GetComponent<Content_Pet>().m_EquipUI.PreSet_CurTab(m_DeckTabUI.Get_Tab());
|
|
// GameUI.Ins.LobbyUI.Get_MenuPet().Set();
|
|
// break;
|
|
// case "Magic":
|
|
// GameUI.Ins.LobbyUI.Get_MenuWitch().gos_contents[2].GetComponent<Content_Skill>().m_EquipMagic.PreSet_CurTab(m_DeckTabUI.Get_Tab());
|
|
// GameUI.Ins.LobbyUI.Get_MenuWitch().Set_Tab(2);
|
|
// break;
|
|
// }
|
|
//}
|
|
public override void OnClick_Back()
|
|
{
|
|
//var sdata = ServerInfo.Ins.m_ServerData;
|
|
//var nowPreset = sdata.Equip.SavePreset[m_Chapter.ToString()];
|
|
//if (nowPreset != m_DeckTabUI.Get_Tab())
|
|
//{
|
|
// sdata.Equip.SavePreset[m_Chapter.ToString()] = m_DeckTabUI.Get_Tab();
|
|
// ToastUI.Ins.Set(164, m_DeckTabUI.Get_Tab());
|
|
// GameUI.Ins.LobbyUI.Get_MenuChapter().Set_UI();
|
|
//}
|
|
base.OnClick_Back();
|
|
}
|
|
} |