상점 카드 작업 중...

This commit is contained in:
Ino 2025-04-22 16:30:24 +09:00
parent 206eb1dc5a
commit 6d3a0da8b4
13 changed files with 372 additions and 135 deletions

View File

@ -88,6 +88,6 @@ messageinfo 엄청 느린 버그
상점 상점
- 인앱 결제 - 인앱 결제
- 상품 ui 등... - 상품 ui 등...
- 상점 테이블의 탭 연결 - 상점 서버 데이터

File diff suppressed because one or more lines are too long

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.

View File

@ -34,6 +34,7 @@ RectTransform:
- {fileID: 3368300502348584841} - {fileID: 3368300502348584841}
- {fileID: 290950992642225545} - {fileID: 290950992642225545}
- {fileID: 1512552238113595276} - {fileID: 1512552238113595276}
- {fileID: 842742296758777702}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
@ -53,6 +54,14 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 50d83b85ec6cabf4bbedd7b7b86dd63d, type: 3} m_Script: {fileID: 11500000, guid: 50d83b85ec6cabf4bbedd7b7b86dd63d, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
texts:
- {fileID: 4128646841872244779}
- {fileID: 4953703298990325885}
images:
- {fileID: 8468924518769424004}
gos:
- {fileID: 4584091953962620348}
- {fileID: 9027545117159098613}
--- !u!1 &238730587393955628 --- !u!1 &238730587393955628
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -489,6 +498,155 @@ MonoBehaviour:
textMeshPro: {fileID: 6400121722687552697} textMeshPro: {fileID: 6400121722687552697}
icon: {fileID: 7047108527698993517} icon: {fileID: 7047108527698993517}
LeftOffset: 0.25 LeftOffset: 0.25
--- !u!1 &5019985765472164256
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8881893452665596750}
- component: {fileID: 7072954240751356628}
- component: {fileID: 370568766683908069}
- component: {fileID: 6085695715982907698}
m_Layer: 5
m_Name: Local TMP
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8881893452665596750
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5019985765472164256}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 842742296758777702}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 150, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7072954240751356628
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5019985765472164256}
m_CullTransparentMesh: 1
--- !u!114 &370568766683908069
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5019985765472164256}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\uD488\uC808"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: a387e325271126742ad15569dba1ac57, type: 2}
m_sharedMaterial: {fileID: -6459762427321423278, guid: a387e325271126742ad15569dba1ac57,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 40
m_fontSizeBase: 40
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 15
m_fontSizeMax: 60
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 4096
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &6085695715982907698
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5019985765472164256}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c2aa95ff1b7adc044bd9372cf2958828, type: 3}
m_Name:
m_EditorClassIdentifier:
m_localtextKey: 389
--- !u!1 &7037000857001869168 --- !u!1 &7037000857001869168
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -834,3 +992,79 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ab4e7dba3733e584abb76cd4fbc0e116, type: 3} m_Script: {fileID: 11500000, guid: ab4e7dba3733e584abb76cd4fbc0e116, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &9027545117159098613
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 842742296758777702}
- component: {fileID: 6643962332453892313}
- component: {fileID: 6735655082217844114}
m_Layer: 5
m_Name: buy_complete
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &842742296758777702
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9027545117159098613}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8881893452665596750}
m_Father: {fileID: 1200175685615469374}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6643962332453892313
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9027545117159098613}
m_CullTransparentMesh: 1
--- !u!114 &6735655082217844114
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9027545117159098613}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.78431374}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 65f581562538e304cbbfe8ee3beab09c, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -1581,11 +1581,11 @@ public partial class ServerData
public bool CanShow_ShopAD(int _id) public bool CanShow_ShopAD(int _id)
{ {
var data = table_shop.Ins.Get_Data(_id); var data = table_shop.Ins.Get_Data(_id);
if (data.PriceType == ePriceType.AD) //if (data.PriceType == ePriceType.AD)
{ //{
var shopdata = Shop[_id.ToString()]; // var shopdata = Shop[_id.ToString()];
return shopdata[2] < data.BuyLimit_Day && shopdata[0] <= 0; // return shopdata[2] < data.BuyLimit_Day && shopdata[0] <= 0;
} //}
return false; return false;
} }
public bool CanShow_ShopAD(eShopTab _tab) public bool CanShow_ShopAD(eShopTab _tab)
@ -1860,19 +1860,6 @@ public partial class ServerData
} }
break; break;
case eItem.ShopPackage:
var pdata = table_shoppackage.Ins.Get_Data(_itemdata.Get_ID());
List<ItemData> itemlst = new List<ItemData>();
for (int i = 0; i < pdata.itemdata.Count; i++)
{
//if (pdata.itemdata[i].item != eItem.None)
// itemlst.AddRange(Add_Item(new ItemData(pdata.itemdata[i].item, pdata.itemdata[i].itemid, pdata.itemdata[i].amount, _itemdata.Name, eUICardType.GetItem)));
}
return itemlst;
case eItem.ADRemove:
Set_Common(eCommon.ADRemove, 1);
break;
case eItem.Potion: case eItem.Potion:
var potionkey = _itemdata.Get_ID().ToString(); var potionkey = _itemdata.Get_ID().ToString();
Potion[potionkey][0] += (int)_itemdata.Amount; Potion[potionkey][0] += (int)_itemdata.Amount;

View File

@ -5,7 +5,6 @@ using System.Collections.Generic;
public enum eShopTab { Pass, Package, Common, Money, Mileage } public enum eShopTab { Pass, Package, Common, Money, Mileage }
public enum eBuyCondition { None, } public enum eBuyCondition { None, }
public enum ePriceType { Cash, AD, Gem, Review, Mileage }
[Serializable] [Serializable]
public class ShopItemListTableData : TableDataBase public class ShopItemListTableData : TableDataBase
@ -14,7 +13,7 @@ public class ShopItemListTableData : TableDataBase
public int n_ShopSubTab, n_SubTabName; public int n_ShopSubTab, n_SubTabName;
protected ObscuredInt _ShopID; protected ObscuredInt _ShopID;
public int n_ShopID public int n_ShopItemID
{ {
get { return _ShopID; } get { return _ShopID; }
set { _ShopID = value; _ShopID.RandomizeCryptoKey(); } set { _ShopID = value; _ShopID.RandomizeCryptoKey(); }
@ -36,7 +35,12 @@ public class ShopItemListTableData : TableDataBase
set { _Mileage = value; _Mileage.RandomizeCryptoKey(); } set { _Mileage = value; _Mileage.RandomizeCryptoKey(); }
} }
public ePriceType e_PriceType; protected ObscuredInt _PriceItemID;
public int n_PriceItemID
{
get { return _PriceItemID; }
set { _PriceItemID = value; _PriceItemID.RandomizeCryptoKey(); }
}
protected ObscuredInt _Price; protected ObscuredInt _Price;
public int n_Price public int n_Price
@ -82,10 +86,9 @@ public class ShopItemListTableData : TableDataBase
set { _ADGapTime = value; _ADGapTime.RandomizeCryptoKey(); } set { _ADGapTime = value; _ADGapTime.RandomizeCryptoKey(); }
} }
public string s_Icon;
public int n_Name;
public int n_Desc;
public string s_Banner; public string s_Banner;
public override string Get_Name() { return table_itemlist.Ins.Get_ItemName(n_ShopItemID); }
} }
public class table_shopitemlist : table_missionbase public class table_shopitemlist : table_missionbase

View File

@ -13,7 +13,6 @@ public class ShopTableData : TableDataBase
public string InappID, Desc, IconSub, BuyCondition; public string InappID, Desc, IconSub, BuyCondition;
public eShopTab Tab; public eShopTab Tab;
public eItem Item, ObtainCheckItem; public eItem Item, ObtainCheckItem;
public ePriceType PriceType;
public ObscuredInt ItemID, ObtainCheckItemID, Mileage, Price, ADGapTime, GoldKillMul, NumUI; public ObscuredInt ItemID, ObtainCheckItemID, Mileage, Price, ADGapTime, GoldKillMul, NumUI;
public ObscuredInt BuyLimit, BuyLimit_Day, BuyLimit_Week, BuyLimit_Month; public ObscuredInt BuyLimit, BuyLimit_Day, BuyLimit_Week, BuyLimit_Month;
public ObscuredDouble Amount; public ObscuredDouble Amount;
@ -52,7 +51,6 @@ public class table_shop : MonoBehaviour
temp.BuyCondition = json["BuyCondition"].ToString(); temp.BuyCondition = json["BuyCondition"].ToString();
temp.NumUI = int.Parse(json["NumUI"].ToString()); temp.NumUI = int.Parse(json["NumUI"].ToString());
temp.Item = DSUtil.StringToEnum<eItem>(json["Item"].ToString()); temp.Item = DSUtil.StringToEnum<eItem>(json["Item"].ToString());
temp.PriceType = DSUtil.StringToEnum<ePriceType>(json["PriceType"].ToString());
temp.ItemID = int.Parse(json["ItemID"].ToString()); temp.ItemID = int.Parse(json["ItemID"].ToString());
temp.Amount = int.Parse(json["Amount"].ToString()); temp.Amount = int.Parse(json["Amount"].ToString());
temp.Mileage = int.Parse(json["Mileage"].ToString()); temp.Mileage = int.Parse(json["Mileage"].ToString());

View File

@ -1,7 +1,20 @@
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class ShopCard : CardBase public class ShopCard : CardBase
{ {
public TextMeshProUGUI[] texts; // 0 상품 이름, 1 제한횟수, 2 가격
public Image[] images; // 0 상품
public GameObject[] gos; // 0 가격 이미지, 1 품절
ShopItemListTableData m_Data;
public override void Set<T>(T _base) public override void Set<T>(T _base)
{ {
base.Set(_base); base.Set(_base);
m_Data = _base as ShopItemListTableData;
texts[0].text = m_Data.Get_Name();
} }
} }

View File

@ -42,10 +42,10 @@ public class ShopCardBase : CardBase
labels[1].text = DSUtil.GetThousandCommaText(m_ShopTableData.Amount); labels[1].text = DSUtil.GetThousandCommaText(m_ShopTableData.Amount);
if (string.IsNullOrEmpty(m_ShopTableData.InappID)) if (string.IsNullOrEmpty(m_ShopTableData.InappID))
{ {
if (m_ShopTableData.PriceType == ePriceType.Review) //if (m_ShopTableData.PriceType == ePriceType.Review)
labels[2].text = "리뷰 쓰기"; // labels[2].text = "리뷰 쓰기";
else //else
labels[2].text = DSUtil.GetThousandCommaText(m_ShopTableData.Price); // labels[2].text = DSUtil.GetThousandCommaText(m_ShopTableData.Price);
} }
else else
{ {
@ -121,106 +121,107 @@ public class ShopCardBase : CardBase
void Set_ADTime() void Set_ADTime()
{ {
if (m_ShopTableData.PriceType == ePriceType.AD) //if (m_ShopTableData.PriceType == ePriceType.AD)
{ //{
sprites[1].gameObject.SetActive(false); // sprites[1].gameObject.SetActive(false);
var sdata = ServerInfo.Ins.m_ServerData; // var sdata = ServerInfo.Ins.m_ServerData;
var time = sdata.Get_ShopADTime(m_ShopTableData.ID); // var time = sdata.Get_ShopADTime(m_ShopTableData.ID);
var buyCondition = sdata.Can_BuyShopItem(m_ShopTableData); // var buyCondition = sdata.Can_BuyShopItem(m_ShopTableData);
if (!string.IsNullOrEmpty(buyCondition)) // if (!string.IsNullOrEmpty(buyCondition))
{ // {
gos[1].SetActive(false); // gos[1].SetActive(false);
labels[2].text = buyCondition; // labels[2].text = buyCondition;
labels[2].transform.localPosition = Vector3.zero; // labels[2].transform.localPosition = Vector3.zero;
} // }
else if (time > 0) // else if (time > 0)
{ // {
gos[1].SetActive(false); // gos[1].SetActive(false);
labels[2].text = DSUtil.Get_TimeText_MS(time); // labels[2].text = DSUtil.Get_TimeText_MS(time);
labels[2].transform.localPosition = Vector3.zero; // labels[2].transform.localPosition = Vector3.zero;
} // }
else // else
{ // {
gos[1].SetActive(true); // gos[1].SetActive(true);
labels[2].text = ""; // labels[2].text = "";
} // }
} //}
else //else
gos[1].SetActive(false); // gos[1].SetActive(false);
} }
string Get_MoneyIcon() string Get_MoneyIcon()
{ {
switch (m_ShopTableData.PriceType) //switch (m_ShopTableData.PriceType)
{ //{
case ePriceType.AD: // //case ePriceType.AD:
return "icon_ad"; // // return "icon_ad";
case ePriceType.Cash: // //case ePriceType.Cash:
case ePriceType.Review: // //case ePriceType.Review:
labels[2].transform.localPosition = Vector3.zero; // // labels[2].transform.localPosition = Vector3.zero;
return "empty"; // // return "empty";
default: // default:
// return "";
//}
return ""; return "";
} }
}
public void OnClick_Buy() public void OnClick_Buy()
{ {
var sdata = ServerInfo.Ins.m_ServerData; //var sdata = ServerInfo.Ins.m_ServerData;
var buycondition = sdata.Can_BuyShopItem(m_ShopTableData); //var buycondition = sdata.Can_BuyShopItem(m_ShopTableData);
if (!string.IsNullOrEmpty(m_ShopTableData.InappID)) //if (!string.IsNullOrEmpty(m_ShopTableData.InappID))
{
if (string.IsNullOrEmpty(buycondition))
InappInfo.Ins.Buy_InappItem(m_ShopTableData.InappID, Set_Limit);
}
else if (m_ShopTableData.PriceType == ePriceType.AD)
{
//if (m_ShopTableData.BuyLimit_Day == 1 && NewGameUI.Ins.m_GuideQuestUI.Get_Purpose() == ePurpose.FreePackage && sdata.Get_Common(eCommon.GuideClear) < 1)
//{ //{
// NewGameUI.Ins.m_GuideQuestUI.Add_GuideQuest(ePurpose.FreePackage); // if (string.IsNullOrEmpty(buycondition))
// if (go_guidearrow) go_guidearrow.SetActive(false); // InappInfo.Ins.Buy_InappItem(m_ShopTableData.InappID, Set_Limit);
// Buy_ShopAD();
//} //}
//else if (sdata.CanShow_ShopAD(m_ShopTableData.ID)) //else if (m_ShopTableData.PriceType == ePriceType.AD)
// ADInfo.Ins.Show_AD(Buy_ShopAD); //{
} // //if (m_ShopTableData.BuyLimit_Day == 1 && NewGameUI.Ins.m_GuideQuestUI.Get_Purpose() == ePurpose.FreePackage && sdata.Get_Common(eCommon.GuideClear) < 1)
else if (m_ShopTableData.PriceType == ePriceType.Review) // //{
{ // // NewGameUI.Ins.m_GuideQuestUI.Add_GuideQuest(ePurpose.FreePackage);
if (string.IsNullOrEmpty(buycondition)) // // if (go_guidearrow) go_guidearrow.SetActive(false);
{ // // Buy_ShopAD();
DataCheckMgr.Ins.Show_Review(() => // //}
{ // //else if (sdata.CanShow_ShopAD(m_ShopTableData.ID))
GetItemUI.Ins.Set(sdata.Add_Item(new ItemData(m_ShopTableData.Item, m_ShopTableData.ItemID, m_ShopTableData.Amount, "review", eUICardType.GetItem))); // // ADInfo.Ins.Show_AD(Buy_ShopAD);
GetItemUI.Ins.Show_Items(); //}
}); //else if (m_ShopTableData.PriceType == ePriceType.Review)
Add_BuyCount();
Set_Limit();
}
}
else
{
//if (Get_PriceItem() != eItem.None && sdata.Check_ItemAmount(Get_PriceItem(), m_ShopTableData.Price))
//{ //{
// if (string.IsNullOrEmpty(buycondition)) // if (string.IsNullOrEmpty(buycondition))
// { // {
// if (m_ShopTableData.Item == eItem.Gold) // DataCheckMgr.Ins.Show_Review(() =>
// { // {
// } // GetItemUI.Ins.Set(sdata.Add_Item(new ItemData(m_ShopTableData.Item, m_ShopTableData.ItemID, m_ShopTableData.Amount, "review", eUICardType.GetItem)));
// else
// {
// var cause = DSUtil.Format("shop {0}", m_ShopTableData.ID);
// sdata.Use_Item(Get_PriceItem(), m_ShopTableData.Price, 0, cause);
// Add_BuyCount();
// GetItemUI.Ins.Set(sdata.Add_Item(new ItemData(m_ShopTableData.Item, m_ShopTableData.ItemID, m_ShopTableData.Amount, cause, eUICardType.GetItem)));
// GetItemUI.Ins.Show_Items(); // GetItemUI.Ins.Show_Items();
// });
// Add_BuyCount();
// Set_Limit(); // Set_Limit();
// } // }
//} //}
//else //else
// ToastUI.Ins.Set(173); //{
// //if (Get_PriceItem() != eItem.None && sdata.Check_ItemAmount(Get_PriceItem(), m_ShopTableData.Price))
// //{
// // if (string.IsNullOrEmpty(buycondition))
// // {
// // if (m_ShopTableData.Item == eItem.Gold)
// // {
// // }
// // else
// // {
// // var cause = DSUtil.Format("shop {0}", m_ShopTableData.ID);
// // sdata.Use_Item(Get_PriceItem(), m_ShopTableData.Price, 0, cause);
// // Add_BuyCount();
// // GetItemUI.Ins.Set(sdata.Add_Item(new ItemData(m_ShopTableData.Item, m_ShopTableData.ItemID, m_ShopTableData.Amount, cause, eUICardType.GetItem)));
// // GetItemUI.Ins.Show_Items();
// // Set_Limit();
// // }
// // }
// // else
// // ToastUI.Ins.Set(173);
// //}
//} //}
} }
}
void Buy_ShopAD() void Buy_ShopAD()
{ {
var sdata = ServerInfo.Ins.m_ServerData; var sdata = ServerInfo.Ins.m_ServerData;
@ -243,14 +244,15 @@ public class ShopCardBase : CardBase
eItem Get_PriceItem() eItem Get_PriceItem()
{ {
switch (m_ShopTableData.PriceType) //switch (m_ShopTableData.PriceType)
{ //{
case ePriceType.AD: // case ePriceType.AD:
case ePriceType.Cash: // case ePriceType.Cash:
case ePriceType.Review: // case ePriceType.Review:
return eItem.None; // return eItem.None;
default: return (eItem)m_ShopTableData.PriceType; // default: return (eItem)m_ShopTableData.PriceType;
} //}
return eItem.Ability;
} }
public void OnClick_ItemInfo() public void OnClick_ItemInfo()

View File

@ -12,7 +12,7 @@ public class ShopMoneyCard : ShopCardBase
if (m_ShopTableData != null) if (m_ShopTableData != null)
{ {
go_best.SetActive(m_ShopTableData.IsBest); go_best.SetActive(m_ShopTableData.IsBest);
labels[1].transform.localPosition = m_ShopTableData.PriceType == ePriceType.Cash ? new Vector3(96.35f, 64.6f) : new Vector3(96.35f, 3f); //labels[1].transform.localPosition = m_ShopTableData.PriceType == ePriceType.Cash ? new Vector3(96.35f, 64.6f) : new Vector3(96.35f, 3f);
labels[1].color = m_ShopTableData.Item == eItem.Gold ? new Color32(255, 255, 95, 255) : new Color32(11, 207, 252, 255); labels[1].color = m_ShopTableData.Item == eItem.Gold ? new Color32(255, 255, 95, 255) : new Color32(11, 207, 252, 255);
} }
} }

View File

@ -259,7 +259,7 @@ public enum eItem
Fairy, WeaponCostume, Pet, Worker, Farmer, Book, Page, Food, Seed, Fairy, WeaponCostume, Pet, Worker, Farmer, Book, Page, Food, Seed,
Title, Inven, Pass, Potion, Relic, Essence, Title, Inven, Pass, Potion, Relic, Essence,
// 상점 // 상점
ShopPackage, ADRemove, Shop,
IdontKnow, DailyInit, IdontKnow, DailyInit,
RoulletteTicket, RoulletteTicket,