160 lines
5.9 KiB
C#
160 lines
5.9 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Content_Costume : MonoBehaviourSingletonScrollViewMgr<Content_Costume>
|
|
{
|
|
public UILabel[] labels; // 0 코스튬 이름, 1 코스튬 설명, 2 전 능력, 3 후 능력, 4 강화 가격, 5 구매 가격
|
|
public GameObject[] gos; // 0 화살표, 1 강화 불가능, 2 젬 이미지, 3 구매 버튼, 4 강화 불가능, 5 강화 Max, 6 상점에서 구매
|
|
public NGUIButtonPress m_NGUIButtonPress;
|
|
public DeckTabUI m_DeckTabUI;
|
|
public CountChoiceUI m_CountChoiceUI;
|
|
|
|
//PCTableData Select_PCTableData;
|
|
//ObscuredInt m_LvUpPrice, m_Unit = 1;
|
|
|
|
//protected override void Awake()
|
|
//{
|
|
// base.Awake();
|
|
// m_NGUIButtonPress.Set_Action(OnClick_LvUp);
|
|
// m_CountChoiceUI.Set(Set_LeftInfoUI);
|
|
//}
|
|
|
|
//private void OnEnable()
|
|
//{
|
|
// m_DeckTabUI.Set(1, Set_UI, true);
|
|
//}
|
|
|
|
//public void Set_UI()
|
|
//{
|
|
// Set_Scroll();
|
|
// var equip = list_CardBase.Find(f => (f as ButlerCostumeCard).IsEquipCostume()) as ButlerCostumeCard;
|
|
// //Set_LeftInfo(equip.Get_PCData());
|
|
//}
|
|
|
|
//public void Set_Scroll()
|
|
//{
|
|
// //Set_ScrollView(table_pc.Ins.Get_DataList());
|
|
//}
|
|
|
|
//public void Set_LeftInfo()
|
|
//{
|
|
// //Select_PCTableData = _select;
|
|
// Set_LeftInfoUI();
|
|
//}
|
|
//void Set_LeftInfoUI()
|
|
//{
|
|
// var sdata = ServerInfo.Ins.m_ServerData;
|
|
// var lv = sdata.PC.Get_Lv(Select_PCTableData.ID);
|
|
// if (lv < 1) m_Unit = 1;
|
|
// else m_Unit = m_CountChoiceUI.Get_Count();
|
|
// if (lv + m_Unit > Select_PCTableData.MaxLv)
|
|
// m_Unit = Select_PCTableData.MaxLv - lv;
|
|
|
|
// int i = 0;
|
|
// labels[i++].text = Select_PCTableData.Name;
|
|
// labels[i++].text = Select_PCTableData.Desc;
|
|
// gos[0].SetActive(false);
|
|
// string valueFormat = Select_PCTableData.ID == 16 ? "{0}" : "{0:#,##0.###}%";
|
|
// double valueMul = Select_PCTableData.ID == 16 ? 1d : 100d;
|
|
// switch (Select_PCTableData.ID)
|
|
// {
|
|
// case 1:
|
|
// case 4:
|
|
// labels[i++].text = labels[i++].text = "";
|
|
// break;
|
|
// default:
|
|
// labels[i++].text = DSUtil.Format(valueFormat, Select_PCTableData.Get_Value(sdata) * valueMul);
|
|
// if (lv < Select_PCTableData.MaxLv)
|
|
// {
|
|
// gos[0].SetActive(true);
|
|
// labels[i++].text = DSUtil.Format(valueFormat, Select_PCTableData.Get_Value(sdata, m_Unit) * valueMul);
|
|
// }
|
|
// else
|
|
// labels[i++].text = "";
|
|
// break;
|
|
// }
|
|
// labels[5].text = DSUtil.GetThousandCommaText(Select_PCTableData.BuyGemPrice);
|
|
|
|
// gos[3].SetActive(lv <= 0);
|
|
// if (lv >= Select_PCTableData.MaxLv)
|
|
// {
|
|
// labels[4].text = "";
|
|
// gos[2].SetActive(false);
|
|
// gos[4].SetActive(true);
|
|
// gos[5].SetActive(true);
|
|
// m_CountChoiceUI.gameObject.SetActive(false);
|
|
// }
|
|
// else
|
|
// {
|
|
// m_LvUpPrice = m_Unit * Select_PCTableData.LvGemPrice;
|
|
// labels[4].text = DSUtil.GetThousandCommaText(m_LvUpPrice);
|
|
// gos[2].SetActive(true);
|
|
// gos[4].SetActive(lv <= 0 || !sdata.Check_ItemAmount(eItem.Gem, Select_PCTableData.LvGemPrice, 0, false));
|
|
// gos[5].SetActive(false);
|
|
// m_CountChoiceUI.gameObject.SetActive(lv > 0);
|
|
// }
|
|
|
|
// if (GameUI.Ins != null)
|
|
// GameUI.Ins.LobbyUI.Get_MenuWitch().Set_3DModel(sdata, Select_PCTableData.ID);
|
|
|
|
// switch (Select_PCTableData.ID)
|
|
// {
|
|
// case 13: case 15: case 16: case 17:
|
|
// gos[6].SetActive(lv == 0);
|
|
// break;
|
|
// default:
|
|
// gos[6].SetActive(false);
|
|
// break;
|
|
// }
|
|
//}
|
|
|
|
//public void OnClick_Buy()
|
|
//{
|
|
// var sdata = ServerInfo.Ins.m_ServerData;
|
|
// if (sdata.Check_ItemAmount(eItem.Gem, Select_PCTableData.BuyGemPrice))
|
|
// {
|
|
// sdata.Use_Item(eItem.Gem, Select_PCTableData.BuyGemPrice, 0, DSUtil.Format("cos buy {0}", Select_PCTableData.ID));
|
|
// sdata.PC.Add_Lv(Select_PCTableData.ID);
|
|
// ServerInfo.Ins.Write(() =>
|
|
// {
|
|
// var buycard = list_CardBase.Find(f => (f as ButlerCostumeCard).IsCostumeCard(Select_PCTableData.ID)) as ButlerCostumeCard;
|
|
// buycard.Set(Select_PCTableData);
|
|
// Set_LeftInfo(buycard.Get_PCData());
|
|
// });
|
|
// }
|
|
//}
|
|
//public void OnClick_BuyFromShop()
|
|
//{
|
|
// GameUI.Ins.LobbyUI.Get_MenuWitch().OnClick_Back();
|
|
// GameUI.Ins.LobbyUI.Get_MenuShop().Set_Tab(eShopTab.Package, 1f);
|
|
//}
|
|
//public void OnClick_LvUp()
|
|
//{
|
|
// var sdata = ServerInfo.Ins.m_ServerData;
|
|
// var lv = sdata.PC.Get_Lv(Select_PCTableData.ID);
|
|
// if (Select_PCTableData.MaxLv > lv && sdata.Check_ItemAmount(eItem.Gem, m_LvUpPrice))
|
|
// {
|
|
// sdata.Use_Item(eItem.Gem, m_LvUpPrice, 0, DSUtil.Format("coslv {0}", Select_PCTableData.ID));
|
|
// sdata.PC.Add_Lv(Select_PCTableData.ID, m_Unit);
|
|
// GameUI.Ins.LobbyUI.Get_MenuWitch().Show_ModelEffect();
|
|
// var lvupcard = list_CardBase.Find(f => (f as ButlerCostumeCard).IsCostumeCard(Select_PCTableData.ID)) as ButlerCostumeCard;
|
|
// lvupcard.Set(Select_PCTableData);
|
|
// Set_LeftInfo(lvupcard.Get_PCData());
|
|
// if (soundtime <= 0f)
|
|
// {
|
|
// SoundInfo.Ins.Play_OneShot(eSound.s012_CosumeLvUp, 0.8f);
|
|
// soundtime = 0.3f;
|
|
// }
|
|
// }
|
|
//}
|
|
|
|
//float soundtime;
|
|
//protected override void Update()
|
|
//{
|
|
// base.Update();
|
|
// if (soundtime > 0f)
|
|
// soundtime -= Time.deltaTime;
|
|
//}
|
|
} |