컬렉션 완료
This commit is contained in:
parent
63fafe9b36
commit
bc5c9b4b35
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 02ab401ba05a82b48b4305fa52c8a755
|
||||
guid: 1b0b613bdb9bd744aa2df4b8dd6855e2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0faaee5a766bf77448691e51db9c5a2b
|
||||
guid: f8576242c9a6a8847894da069bf85bba
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d5aca836250d8d74a93ba6d6209a5883
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -842,31 +842,22 @@ public partial class ServerData
|
|||
MobKill[key].RandomizeCryptoKey();
|
||||
}
|
||||
}
|
||||
public bool Noti_CollectionEquipment(eTargetCondition targetCondition, int menucategory)
|
||||
public bool CanGetMobCollection(int id, int condition, bool showtoast)
|
||||
{
|
||||
var lst = table_collectionlist.Ins.Get_DataList(targetCondition, menucategory);
|
||||
for (int i = 0; i < lst.Count; i++)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
var amount = Get_ItemAmount(lst[i].n_TargetValue);
|
||||
var conditon = lst[i].Get_ConditionCount(Get_CollectionLv(lst[i].n_TargetValue));
|
||||
if (amount >= conditon)
|
||||
return true;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
var key = Get_Key(id);
|
||||
if (MobKill.ContainsKey(key)) return MobKill[key] >= condition;
|
||||
if (showtoast) ToastUI.Ins.Set(300);
|
||||
return false;
|
||||
}
|
||||
public bool Noti_CollectionMob(eTargetCondition targetCondition, int menucategory)
|
||||
public bool Noti_CollectionEM(eTargetCondition targetCondition, int menucategory)
|
||||
{
|
||||
var lst = table_collectionlist.Ins.Get_DataList(targetCondition, menucategory);
|
||||
for (int i = 0; i < lst.Count; i++)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
var amount = Get_CollectionMobKill(lst[i].n_TargetValue);
|
||||
var amount = targetCondition == eTargetCondition.TakeEquip ? Get_ItemAmount(lst[i].n_TargetValue) :
|
||||
Get_CollectionMobKill(lst[i].n_TargetValue);
|
||||
var conditon = lst[i].Get_ConditionCount(Get_CollectionLv(lst[i].n_TargetValue));
|
||||
if (amount >= conditon)
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ public class TabUIData
|
|||
public Color color_bg_on = Color.white;
|
||||
public Color color_bg_off = Color.gray;
|
||||
|
||||
public int n_Update = 0;
|
||||
|
||||
public Action onClick;
|
||||
/// <summary>
|
||||
/// (자동설정) 선택된 탭 설정, 탭 UI 상태 갱신
|
||||
|
|
@ -29,6 +31,7 @@ public class TabUIData
|
|||
public class TabUIBase : uScrollViewMgr
|
||||
{
|
||||
int m_Index = 0;
|
||||
List<TabUIData> list_tabData;
|
||||
|
||||
public void Set(List<TabUIData> lst)
|
||||
{
|
||||
|
|
@ -39,6 +42,7 @@ public class TabUIBase : uScrollViewMgr
|
|||
lst[i].m_Index = i;
|
||||
lst[i].onTabAction = OnClick_Tab;
|
||||
}
|
||||
list_tabData = lst;
|
||||
Set_ScrollView(lst);
|
||||
Set_UI();
|
||||
}
|
||||
|
|
@ -59,7 +63,12 @@ public class TabUIBase : uScrollViewMgr
|
|||
|
||||
void OnClick_Tab(int index)
|
||||
{
|
||||
m_Index = index;
|
||||
Set_UI();
|
||||
if (list_tabData[index].n_Update > 0)
|
||||
Popup.Ins.Set(ePopupType.One, list_tabData[index].n_Update);
|
||||
else
|
||||
{
|
||||
m_Index = index;
|
||||
Set_UI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ public class CollectionUI : BotMenuBase
|
|||
new TabUIData{ n_btnName = 273, },
|
||||
new TabUIData{ n_btnName = 274, },
|
||||
new TabUIData{ n_btnName = 275, },
|
||||
new TabUIData{ n_btnName = 276, },
|
||||
new TabUIData{ n_btnName = 276, n_Update = 362 },
|
||||
};
|
||||
|
||||
private void Start()
|
||||
|
|
|
|||
|
|
@ -19,26 +19,13 @@ public class CollectionEMCardBase : CardBase
|
|||
|
||||
texts[1].text = MyText.Get_eAwakenUpgradeOptionTypeName(m_Data.n_RepeatRewardValue);
|
||||
texts[3].text = m_Data.n_RepeatRewardCount.ToString();
|
||||
var amount = sdata.Get_ItemAmount(m_Data.n_TargetValue);
|
||||
var lv = sdata.Get_CollectionLv(m_Data.n_TargetValue);
|
||||
var count = m_Data.Get_ConditionCount(lv);
|
||||
texts[2].text = $"{amount}/{count}";
|
||||
slider_proc.value = DSUtil.Get_SliderValue((float)(amount / count));
|
||||
|
||||
go_getreward.SetActive(amount >= count);
|
||||
go_selected.SetActive(false);
|
||||
|
||||
Set_Selected(false);
|
||||
}
|
||||
|
||||
public override TableDataBase Get_Data() { return m_Data; }
|
||||
public override void Set_Selected(bool active) { go_selected.SetActive(active); }
|
||||
|
||||
protected bool CanGet(bool showtoast)
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
var lv = sdata.Get_CollectionLv(m_Data.n_TargetValue);
|
||||
return sdata.Check_ItemAmount(m_Data.n_TargetValue, m_Data.Get_ConditionCount(lv), showtoast);
|
||||
}
|
||||
|
||||
public virtual void OnClick_Card() { }
|
||||
public virtual void OnClick_GetReward() { }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ using System.Collections.Generic;
|
|||
|
||||
public class CollectionEMUIBase : PCUIMenu
|
||||
{
|
||||
public eTargetCondition m_TargetCondition;
|
||||
public int TabNameStart = 290;
|
||||
public TabUIBase m_Tab;
|
||||
public CollectionEM_Scroll m_CollectionScroll;
|
||||
public CollectionEM_InfoBase m_CollectionInfo;
|
||||
|
|
@ -14,14 +16,18 @@ public class CollectionEMUIBase : PCUIMenu
|
|||
base.Set();
|
||||
for (int i = 0; i < list_tabData.Count; i++)
|
||||
{
|
||||
list_tabData[i].n_btnName = TabNameStart + i;
|
||||
list_tabData[i].onClick = Set_UI;
|
||||
list_tabData[i].btnImg_off = "tab menu unselected 2";
|
||||
list_tabData[i].btnImg_on = "tab menu selected 2";
|
||||
}
|
||||
m_Tab.Set(list_tabData);
|
||||
Set_UI();
|
||||
}
|
||||
|
||||
public virtual void Set_UI()
|
||||
public void Set_UI()
|
||||
{
|
||||
m_CollectionScroll.Set(m_TargetCondition, m_Tab.Get_Index());
|
||||
if (DSUtil.CheckNull(m_SelectCard))
|
||||
Set_SelectCard(m_CollectionScroll.Get_FirstCard());
|
||||
else
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public class CollectionEM_InfoBase : uScrollViewMgr
|
|||
|
||||
protected CardBase m_SelectCard;
|
||||
|
||||
public void Set(CardBase card)
|
||||
public virtual void Set(CardBase card)
|
||||
{
|
||||
if (!DSUtil.CheckNull(m_SelectCard))
|
||||
m_SelectCard.Set_Selected(false);
|
||||
|
|
@ -40,16 +40,16 @@ public class CollectionEM_InfoBase : uScrollViewMgr
|
|||
DSUtil.Format(358, MyText.Get_eAwakenUpgradeOptionTypeName(data.n_RepeatRewardValue), data.n_RepeatRewardCount) :
|
||||
DSUtil.Format(359, MyText.Get_eAwakenUpgradeOptionTypeName(data.n_FirstRewardValue.ToString()), data.n_FirstRewardCount);
|
||||
|
||||
go_noti.SetActive(sdata.Noti_CollectionEquipment(data.e_TargetCondition, data.e_MenuCategory));
|
||||
|
||||
var lst = table_collectionlist.Ins.Get_DataList(data.e_TargetCondition, data.e_MenuCategory);
|
||||
var count = lst.Count;
|
||||
var obtaincount = 0;
|
||||
for (int i = 0; i < lst.Count; i++)
|
||||
{
|
||||
if (sdata.IsObtainItem(lst[i].n_TargetValue))
|
||||
if (sdata.Get_CollectionLv(lst[i].n_TargetValue) > 0)
|
||||
++obtaincount;
|
||||
}
|
||||
texts[1].text = DSUtil.Format(360, obtaincount, count);
|
||||
|
||||
go_noti.SetActive(sdata.Noti_CollectionEM(data.e_TargetCondition, data.e_MenuCategory));
|
||||
}
|
||||
}
|
||||
|
|
@ -14,6 +14,22 @@ public class CollectionEquipmentCard : CollectionEMCardBase
|
|||
//images[0].sprite = UIAtlasMgr.Ins.Get_GradeSprite(itemData.n_ItemGrade);
|
||||
images[0].sprite = UIAtlasMgr.Ins.Get_Sprite(itemData.n_ItemID);
|
||||
texts[0].text = table_itemlist.Ins.Get_ItemName(itemData.n_ItemID);
|
||||
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
var amount = sdata.Get_ItemAmount(m_Data.n_TargetValue);
|
||||
var lv = sdata.Get_CollectionLv(m_Data.n_TargetValue);
|
||||
var count = m_Data.Get_ConditionCount(lv);
|
||||
texts[2].text = $"{amount}/{count}";
|
||||
slider_proc.value = DSUtil.Get_SliderValue((float)(amount / count));
|
||||
|
||||
go_getreward.SetActive(amount >= count);
|
||||
}
|
||||
|
||||
bool CanGet(bool showtoast)
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
var lv = sdata.Get_CollectionLv(m_Data.n_TargetValue);
|
||||
return sdata.Check_ItemAmount(m_Data.n_TargetValue, m_Data.Get_ConditionCount(lv), showtoast);
|
||||
}
|
||||
|
||||
public override void OnClick_Card() { CollectionEquipmentUI.Ins.Set_SelectCard(this); }
|
||||
|
|
|
|||
|
|
@ -6,15 +6,5 @@ public class CollectionEquipmentUI : CollectionEMUIBase
|
|||
{
|
||||
Ins = this;
|
||||
base.Set();
|
||||
for (int i = 0; i < list_tabData.Count; i++)
|
||||
list_tabData[i].n_btnName = 290 + i;
|
||||
m_Tab.Set(list_tabData);
|
||||
Set_UI();
|
||||
}
|
||||
|
||||
public override void Set_UI()
|
||||
{
|
||||
m_CollectionScroll.Set(eTargetCondition.TakeEquip, m_Tab.Get_Index());
|
||||
base.Set_UI();
|
||||
}
|
||||
}
|
||||
|
|
@ -6,10 +6,11 @@ public class CollectionEquipmentUI_Info : CollectionEM_InfoBase
|
|||
|
||||
EquipmentListTableData m_MakeData;
|
||||
|
||||
public void Set(CollectionEquipmentCard card)
|
||||
public override void Set(CardBase card)
|
||||
{
|
||||
base.Set(card);
|
||||
var data = m_SelectCard.Get_Data() as CollectionListTableData;
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
m_MakeData = table_equipitemlist.Ins.Get_Data_orNull(data.n_TargetValue);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,12 @@
|
|||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class CollectionMonsterCard : CardBase
|
||||
public class CollectionMonsterCard : CollectionEMCardBase
|
||||
{
|
||||
public Image[] images; // 0 등급, 1 아이콘
|
||||
public TextMeshProUGUI[] texts; // 0 이름, 1 보유효과, 2 현재 처치/필요 처치
|
||||
public Slider slider_proc;
|
||||
public GameObject go_getreward, go_selected;
|
||||
|
||||
CollectionListTableData m_Data;
|
||||
|
||||
public override void Set<T>(T _base)
|
||||
{
|
||||
base.Set(_base);
|
||||
m_Data = _base as CollectionListTableData;
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
var mobData = table_monsterlist.Ins.Get_Data_orNull(m_Data.n_TargetValue);
|
||||
images[0].sprite = UIAtlasMgr.Ins.Get_Sprite(mobData.s_MonsterIcon);
|
||||
|
||||
images[0].sprite = UIAtlasMgr.Ins.Get_GradeSprite(1);
|
||||
images[1].sprite = UIAtlasMgr.Ins.Get_Sprite(mobData.s_MonsterIcon);
|
||||
|
||||
texts[0].text = mobData.Get_Name();
|
||||
texts[1].text = m_Data.n_RepeatRewardValue;
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
var amount = sdata.Get_CollectionMobKill(m_Data.n_TargetValue);
|
||||
var lv = sdata.Get_CollectionLv(m_Data.n_TargetValue);
|
||||
var count = m_Data.Get_ConditionCount(lv);
|
||||
|
|
@ -30,24 +14,20 @@ public class CollectionMonsterCard : CardBase
|
|||
slider_proc.value = DSUtil.Get_SliderValue((float)(amount / count));
|
||||
|
||||
go_getreward.SetActive(amount >= count);
|
||||
go_selected.SetActive(false);
|
||||
}
|
||||
|
||||
public override TableDataBase Get_Data() { return m_Data; }
|
||||
|
||||
bool CanGet(bool showtoast)
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
var lv = sdata.Get_CollectionLv(m_Data.n_TargetValue);
|
||||
return sdata.Get_CollectionMobKill(m_Data.n_TargetValue) >= m_Data.Get_ConditionCount(lv);
|
||||
return sdata.CanGetMobCollection(m_Data.n_TargetValue, m_Data.Get_ConditionCount(lv), showtoast);
|
||||
}
|
||||
|
||||
public void OnClick_Card()
|
||||
{
|
||||
CollectionMonsterUI.Ins.Set_SelectCard(this);
|
||||
}
|
||||
public override void OnClick_Card() { CollectionMonsterUI.Ins.Set_SelectCard(this); }
|
||||
|
||||
public void OnClick_GetReward()
|
||||
public void OnClick_Info() { }
|
||||
|
||||
public override void OnClick_GetReward()
|
||||
{
|
||||
if (CanGet(true))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,45 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
public class CollectionMonsterUI : PCUIMenu
|
||||
public class CollectionMonsterUI : CollectionEMUIBase
|
||||
{
|
||||
public static CollectionMonsterUI Ins;
|
||||
|
||||
public TabUIBase m_Tab;
|
||||
public CollectionMonsterUI_Scroll m_Scroll;
|
||||
public CollectionMonsterUI_Info m_Info;
|
||||
|
||||
List<TabUIData> list_tabData = new List<TabUIData>
|
||||
{
|
||||
new TabUIData{ n_btnName = 297 }, new TabUIData{ n_btnName = 298 }, new TabUIData{ n_btnName = 299 }
|
||||
};
|
||||
CollectionMonsterCard m_SelectCard;
|
||||
|
||||
public override void Set()
|
||||
{
|
||||
Ins = this;
|
||||
base.Set();
|
||||
for (int i = 0; i < list_tabData.Count; i++)
|
||||
{
|
||||
list_tabData[i].onClick = Set_UI;
|
||||
list_tabData[i].btnImg_off = "tab menu unselected 2";
|
||||
list_tabData[i].btnImg_on = "tab menu selected 2";
|
||||
}
|
||||
m_Tab.Set(list_tabData);
|
||||
Set_UI();
|
||||
}
|
||||
|
||||
public void Set_UI()
|
||||
{
|
||||
m_Scroll.Set(m_Tab.Get_Index());
|
||||
if (DSUtil.CheckNull(m_SelectCard))
|
||||
Set_SelectCard(m_Scroll.Get_FirstCard());
|
||||
else
|
||||
Set_SelectCard(m_SelectCard);
|
||||
}
|
||||
|
||||
public void Set_SelectCard(CollectionMonsterCard card)
|
||||
{
|
||||
m_SelectCard = card;
|
||||
m_Info.Set(m_SelectCard);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue