상점 캐시템과 플레이팹
This commit is contained in:
parent
504ce47a7c
commit
8cc3cd0424
|
|
@ -88,7 +88,9 @@ messageinfo 엄청 느린 버그
|
|||
상점
|
||||
- 인앱 결제
|
||||
- 상품 ui 등...
|
||||
- 상점 서버 데이터
|
||||
-- 초기화
|
||||
-- 총 구매 횟수, 이번 구매 횟수, 남은 광고 시간
|
||||
- 메일 보상 받을 때 상점 아이템인 지 확인
|
||||
// - 인앱 구매 플레이팹 연동 등
|
||||
|
||||
|
||||
|
||||
인게임 전투 방식 및 타격감 등 - 갓깨비 키우기
|
||||
|
|
@ -324,16 +324,13 @@ handlers.Write_Onestore = function(args)
|
|||
function Add_ShopMail(productid)
|
||||
{
|
||||
var shoptable = Get_ShopTable();
|
||||
var finddata = shoptable.find(f=>f.InappID == productid);
|
||||
var finddata = shoptable.find(f=>f.s_InappID == productid);
|
||||
if(!CheckNullOrEmpty(finddata))
|
||||
{
|
||||
var maildata = {};
|
||||
maildata.Day = 30;
|
||||
maildata.Reward = finddata.Item;
|
||||
maildata.ID = finddata.ID;
|
||||
maildata.RewardAmount = finddata.Amount;
|
||||
maildata.Msg = finddata.Name;
|
||||
maildata.IsShopItem = 1;
|
||||
maildata.ItemID = finddata.n_ShopItemID;
|
||||
maildata.Amount = 1;
|
||||
Add_Mail(maildata);
|
||||
}
|
||||
}
|
||||
|
|
@ -905,8 +902,8 @@ function Get_CouponTable()
|
|||
}
|
||||
function Get_ShopTable()
|
||||
{
|
||||
var table = JSON.parse(server.GetTitleInternalData("ShopTable").Data.ShopTable);
|
||||
return table.table_shop;
|
||||
var titleData = server.GetTitleInternalData({ Keys: ["ShopTable"] });
|
||||
return JSON.parse(titleData.Data.ShopTable);
|
||||
}
|
||||
function Get_PlayOCoupons()
|
||||
{
|
||||
|
|
|
|||
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
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -7655,81 +7655,6 @@ MonoBehaviour:
|
|||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &597404944635992037
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8251428422656517467}
|
||||
- component: {fileID: 7878093561182033450}
|
||||
- component: {fileID: 8707906087741012494}
|
||||
m_Layer: 5
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8251428422656517467
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 597404944635992037}
|
||||
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: 2802971810959098556}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -1561.7, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &7878093561182033450
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 597404944635992037}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 0
|
||||
--- !u!114 &8707906087741012494
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 597404944635992037}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 5
|
||||
m_Right: 0
|
||||
m_Top: 2
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_StartCorner: 0
|
||||
m_StartAxis: 0
|
||||
m_CellSize: {x: 360, y: 410}
|
||||
m_Spacing: {x: 10, y: 10}
|
||||
m_Constraint: 2
|
||||
m_ConstraintCount: 1
|
||||
--- !u!1 &614128750645687069
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -15547,7 +15472,6 @@ RectTransform:
|
|||
- {fileID: 3241167438360758900}
|
||||
- {fileID: 8263171269283795704}
|
||||
- {fileID: 8346797560638034965}
|
||||
- {fileID: 6469088889267929710}
|
||||
- {fileID: 7508907425988721624}
|
||||
m_Father: {fileID: 6291925347982253742}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -15576,9 +15500,7 @@ MonoBehaviour:
|
|||
- {fileID: 5347853226888182770}
|
||||
Tab_Main: {fileID: 4425228685122679352}
|
||||
Tab_Sub: {fileID: 6394690042655658315}
|
||||
shopContents:
|
||||
- {fileID: 4751763833754436815}
|
||||
- {fileID: 4262456723639236188}
|
||||
shopContents: {fileID: 4751763833754436815}
|
||||
m_ShopPackagePopup: {fileID: 8277929067037878694}
|
||||
--- !u!1 &1145784816424712090
|
||||
GameObject:
|
||||
|
|
@ -30750,98 +30672,6 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_localtextKey: 296
|
||||
--- !u!1 &2088215860123444157
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6469088889267929710}
|
||||
- component: {fileID: 4262456723639236188}
|
||||
- component: {fileID: 7909704444604148524}
|
||||
- component: {fileID: 8294827342354674348}
|
||||
m_Layer: 5
|
||||
m_Name: shop_pass
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6469088889267929710
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2088215860123444157}
|
||||
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: 1674737735668229953}
|
||||
m_Father: {fileID: 6816744240132360706}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: -780.86, y: -114.999954}
|
||||
m_SizeDelta: {x: 1561.72, y: 850}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &4262456723639236188
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2088215860123444157}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e4ccd00fcfbf7c04291805504687cc39, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ScrollRect: {fileID: 9201499458999383001}
|
||||
m_Content: {fileID: 0}
|
||||
go_card: {fileID: 0}
|
||||
--- !u!222 &7909704444604148524
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2088215860123444157}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8294827342354674348
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2088215860123444157}
|
||||
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.89019614, g: 0.6313726, b: 0.4156863, 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_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
|
||||
--- !u!1 &2088811925445685512
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -39448,7 +39278,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8346797560638034965
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -59955,96 +59785,6 @@ MonoBehaviour:
|
|||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 1
|
||||
--- !u!1 &4112671441212774444
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2802971810959098556}
|
||||
- component: {fileID: 4842106403283127980}
|
||||
- component: {fileID: 1397312276683330478}
|
||||
- component: {fileID: 1375048546870340414}
|
||||
m_Layer: 5
|
||||
m_Name: Viewport
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2802971810959098556
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4112671441212774444}
|
||||
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: 8251428422656517467}
|
||||
m_Father: {fileID: 1674737735668229953}
|
||||
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, y: 1}
|
||||
--- !u!222 &4842106403283127980
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4112671441212774444}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1397312276683330478
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4112671441212774444}
|
||||
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: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
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
|
||||
--- !u!114 &1375048546870340414
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4112671441212774444}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ShowMaskGraphic: 0
|
||||
--- !u!1 &4119744140244452738
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -62928,7 +62668,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &7508907425988721624
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -85362,82 +85102,6 @@ MonoBehaviour:
|
|||
- {fileID: 2359964792895164501}
|
||||
- {fileID: 8674532541075057407}
|
||||
go_noti: {fileID: 8937677757188368109}
|
||||
--- !u!1 &6080789175061639202
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1674737735668229953}
|
||||
- component: {fileID: 4373966669695845335}
|
||||
- component: {fileID: 9201499458999383001}
|
||||
m_Layer: 5
|
||||
m_Name: scrollview_
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1674737735668229953
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6080789175061639202}
|
||||
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: 2802971810959098556}
|
||||
m_Father: {fileID: 6469088889267929710}
|
||||
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.0024567}
|
||||
m_SizeDelta: {x: 1561.7, y: 850}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4373966669695845335
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6080789175061639202}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &9201499458999383001
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6080789175061639202}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Content: {fileID: 8251428422656517467}
|
||||
m_Horizontal: 1
|
||||
m_Vertical: 0
|
||||
m_MovementType: 1
|
||||
m_Elasticity: 0.1
|
||||
m_Inertia: 1
|
||||
m_DecelerationRate: 0.135
|
||||
m_ScrollSensitivity: 1
|
||||
m_Viewport: {fileID: 2802971810959098556}
|
||||
m_HorizontalScrollbar: {fileID: 0}
|
||||
m_VerticalScrollbar: {fileID: 0}
|
||||
m_HorizontalScrollbarVisibility: 0
|
||||
m_VerticalScrollbarVisibility: 0
|
||||
m_HorizontalScrollbarSpacing: 0
|
||||
m_VerticalScrollbarSpacing: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &6087577575337862780
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ public class InappInfo : MonoBehaviour, IDetailedStoreListener
|
|||
private PurchaseEventArgs m_PurchaseEventArgs;
|
||||
|
||||
Action m_success;
|
||||
ShopItemListTableData m_Data;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
|
@ -72,21 +73,14 @@ public class InappInfo : MonoBehaviour, IDetailedStoreListener
|
|||
return null;
|
||||
}
|
||||
|
||||
public void Set(Action success)
|
||||
public void Set(List<string> list)
|
||||
{
|
||||
m_success = success;
|
||||
|
||||
#if FGB_OneStore
|
||||
GaaIapCallManager.StartConnection("MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCv1859fihjc+QXPQNYVfIFQQ6YJnjNUTYz7SAP00CYIefCwj4/D6LxGsLwtAJwn1jKng0QDHmyQUyO0k0QnLm7wqOwT0je+eD7wQ0G4BG3bETMOlYpAxpLFq3JmD1qMEemgrSgDldgvjWcyrdEzM01mr6q7+tXh4MBCt1ld1JFBQIDAQAB");
|
||||
#else
|
||||
ConfigurationBuilder cBuilder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
|
||||
var list = table_shop.Ins.Get_DataList();
|
||||
for (int iLoop = 0; iLoop < list.Count; ++iLoop)
|
||||
{
|
||||
var shopdata = list[iLoop] as ShopTableData;
|
||||
if (!string.IsNullOrEmpty(shopdata.InappID))
|
||||
cBuilder.AddProduct(shopdata.InappID, ProductType.Consumable);
|
||||
}
|
||||
cBuilder.AddProduct(list[iLoop], ProductType.Consumable);
|
||||
UnityPurchasing.Initialize(this, cBuilder);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -104,15 +98,16 @@ public class InappInfo : MonoBehaviour, IDetailedStoreListener
|
|||
#endif
|
||||
}
|
||||
|
||||
public void Buy_InappItem(string _id, Action _act)
|
||||
public void Buy_InappItem(ShopItemListTableData data, Action _act)
|
||||
{
|
||||
m_Data = data;
|
||||
m_success = _act;
|
||||
|
||||
ServerInfo.Ins.Check_CanBuyInapp(() =>
|
||||
ServerInfo.Ins.Check_Token(() =>
|
||||
{
|
||||
#if FGB_OneStore
|
||||
PurchaseFlowParams param = new PurchaseFlowParams();
|
||||
param.productId = _id;
|
||||
param.productId = data.s_InappID;
|
||||
param.productType = Gaa.ProductType.INAPP;
|
||||
//param.devPayload = "결제 후에 데이터의 정합성과 부가 데이터를 확인하기 위해 사용할 수 있습니다.";
|
||||
//param.productName = ""; // optional
|
||||
|
|
@ -122,7 +117,7 @@ public class InappInfo : MonoBehaviour, IDetailedStoreListener
|
|||
GaaIapCallManager.LaunchPurchaseFlow(param);
|
||||
#else
|
||||
if (m_storeController != null)
|
||||
m_storeController.InitiatePurchase(_id);
|
||||
m_storeController.InitiatePurchase(data.s_InappID);
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
|
@ -133,7 +128,7 @@ public class InappInfo : MonoBehaviour, IDetailedStoreListener
|
|||
|
||||
#if UNITY_EDITOR
|
||||
UnityIAP_Process(true);
|
||||
#elif UNITY_ANDROID
|
||||
#elif UNITY_ANDROID // TODO 정인호 : 영수증 검증 너드나비스 서버로 변경 필요
|
||||
// Deserialize receipt
|
||||
var googleReceipt = GooglePurchase.FromJson(e.purchasedProduct.receipt);
|
||||
|
||||
|
|
@ -171,14 +166,18 @@ public class InappInfo : MonoBehaviour, IDetailedStoreListener
|
|||
{
|
||||
if (_success)
|
||||
{
|
||||
table_shop.Ins.Buy_Inapp(m_PurchaseEventArgs.purchasedProduct.definition.id,
|
||||
() =>
|
||||
{
|
||||
m_storeController.ConfirmPendingPurchase(m_PurchaseEventArgs.purchasedProduct);
|
||||
m_PurchaseEventArgs = null;
|
||||
m_success?.Invoke();
|
||||
m_success = null;
|
||||
});
|
||||
ServerInfo.Ins.m_ServerData.Add_ShopBuyCount(m_Data.n_ShopItemID);
|
||||
var inappid = m_PurchaseEventArgs.purchasedProduct.definition.id;
|
||||
ServerInfo.Ins.Write_UnityInApp(inappid, () =>
|
||||
{
|
||||
NewGameUI.Ins.gos_noti[0].SetActive(true);
|
||||
MyText.Show_CheckMailBox(); // 상품 우편 지급 팝업
|
||||
|
||||
m_storeController.ConfirmPendingPurchase(m_PurchaseEventArgs.purchasedProduct);
|
||||
m_PurchaseEventArgs = null;
|
||||
m_success?.Invoke();
|
||||
m_success = null;
|
||||
}); // 서버에서 우편으로 아이템 지급
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -190,9 +189,8 @@ public class InappInfo : MonoBehaviour, IDetailedStoreListener
|
|||
|
||||
public void OnInitializeFailed(InitializationFailureReason error)
|
||||
{
|
||||
//DSUtil.Format("Inapp OnInitializeFailed : {0}", error);
|
||||
DSUtil.Format("Inapp OnInitializeFailed : {0}", error);
|
||||
m_storeController = null;
|
||||
m_success?.Invoke(); // 일단 로그인 시킴
|
||||
m_success = null;
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +212,6 @@ public class InappInfo : MonoBehaviour, IDetailedStoreListener
|
|||
{
|
||||
Debug.Log("Inapp OnInitialized");
|
||||
m_storeController = controller;
|
||||
m_success?.Invoke();
|
||||
m_success = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class SC_Mail { public List<ServerMailData> Mail; }
|
|||
public class ServerMailData
|
||||
{
|
||||
public string Msg, RemainTime;
|
||||
public int ItemID, Amount;
|
||||
public int ItemID, Amount, IsShopItem;
|
||||
|
||||
public DateTime RemnantTime;
|
||||
}
|
||||
|
|
@ -1245,7 +1245,13 @@ public partial class ServerData
|
|||
}
|
||||
#endregion
|
||||
#region 상점
|
||||
// 0 총 구매횟수, 1 이번 구매횟수, 2 광고 남은 시간
|
||||
// 0 총 구매횟수, 1 이번 구매횟수, 2 광고 남은 시간, 3 우편함 존재 갯수
|
||||
void Check_ShopData(int _id)
|
||||
{
|
||||
var key = Get_Key(_id);
|
||||
if (!Shop.ContainsKey(key))
|
||||
Shop.Add(key, new List<ObscuredInt> { 0, 0, 0 });
|
||||
}
|
||||
void Init_Shop()
|
||||
{
|
||||
var lst_day = table_shopitemlist.Ins.Get_DataList_Day();
|
||||
|
|
@ -1292,8 +1298,8 @@ public partial class ServerData
|
|||
}
|
||||
public void Add_ShopBuyCount(int _id)
|
||||
{
|
||||
Check_ShopData(_id);
|
||||
var key = Get_Key(_id);
|
||||
if (!Shop.ContainsKey(key)) Shop.Add(key, new List<ObscuredInt> { 0, 0, 0 });
|
||||
++Shop[key][0]; Shop[key][0].RandomizeCryptoKey();
|
||||
++Shop[key][1]; Shop[key][1].RandomizeCryptoKey();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -696,7 +696,7 @@ public class ServerInfo : MyCoroutine
|
|||
Set_Coroutine(() => { SendMail_Daily(_isKing, _isGod); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Check_CanBuyInapp(Action success)
|
||||
public void Check_Token(Action success)
|
||||
{
|
||||
NetWait.Ins.Set(true);
|
||||
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ public class table_shopitemlist : table_missionbase
|
|||
protected override void Start()
|
||||
{
|
||||
tableDatas = JsonConvert.DeserializeObject<List<ShopItemListTableData>>(json_last);
|
||||
List<string> list_inappids = new List<string>();
|
||||
|
||||
int maintab = -1, subtab = -1;
|
||||
for (int i = 0; i < Get_DataList().Count; i++)
|
||||
|
|
@ -142,13 +143,16 @@ public class table_shopitemlist : table_missionbase
|
|||
if (!SubTabDatas.ContainsKey(maintab))
|
||||
SubTabDatas.Add(maintab, new List<TabUIData>());
|
||||
subtab = temp.n_ShopSubTab;
|
||||
SubTabDatas[maintab].Add(new TabUIData { m_Index = subtab, n_btnName = temp.n_SubTabName });
|
||||
if (!SubTabDatas[maintab].Exists(tab => tab.m_Index == temp.n_ShopSubTab))
|
||||
SubTabDatas[maintab].Add(new TabUIData { m_Index = subtab, n_btnName = temp.n_SubTabName });
|
||||
}
|
||||
|
||||
if (temp.n_PriceItemID == -1) list_ad.Add(temp); // 광고
|
||||
if (temp.BuyLimit_Day > 0) list_day.Add(temp); // 일일
|
||||
if (temp.BuyLimit_Week > 0) list_week.Add(temp); // 주간
|
||||
if (temp.BuyLimit_Month > 0) list_month.Add(temp); // 월간
|
||||
|
||||
if (!string.IsNullOrEmpty(temp.s_InappID)) list_inappids.Add(temp.s_InappID); // 인앱
|
||||
}
|
||||
|
||||
// 정렬
|
||||
|
|
@ -156,8 +160,11 @@ public class table_shopitemlist : table_missionbase
|
|||
foreach (var kvp in SubTabDatas)
|
||||
kvp.Value.Sort((a, b) => a.m_Index.CompareTo(b.m_Index));
|
||||
|
||||
InappInfo.Ins.Set(list_inappids);
|
||||
|
||||
base.Start();
|
||||
}
|
||||
public static Action Login;
|
||||
|
||||
public ShopItemListTableData Get_Data(int maintab, int subtab = 0) { return dic_shop[(maintab, subtab)][0]; }
|
||||
public List<ShopItemListTableData> Get_DataList() { return tableDatas; }
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ public class ShopTableData : TableDataBase
|
|||
public class table_shop : MonoBehaviour
|
||||
{
|
||||
public static table_shop Ins;
|
||||
public static Action Login;
|
||||
|
||||
public TextAsset m_json;
|
||||
|
||||
|
|
@ -70,8 +69,6 @@ public class table_shop : MonoBehaviour
|
|||
|
||||
list_Data.Add(temp);
|
||||
}
|
||||
|
||||
InappInfo.Ins.Set(Login);
|
||||
}
|
||||
|
||||
#if FGB_OneStore
|
||||
|
|
|
|||
|
|
@ -15,12 +15,26 @@ public class MailCard : CardBase
|
|||
|
||||
images[0].sprite = UIAtlasMgr.Ins.Get_Sprite(m_ServerMailData.ItemID);
|
||||
texts[0].text = m_ServerMailData.Amount.ToString();
|
||||
texts[1].text = m_ServerMailData.Msg;
|
||||
Set_Msg();
|
||||
var ts = m_ServerMailData.RemnantTime - ServerInfo.ServerTime;
|
||||
if (ts.TotalDays < 1) texts[2].text = DSUtil.Format(145, ts.Hours, ts.Minutes);
|
||||
else texts[2].text = DSUtil.Format(146, (int)ts.TotalDays);
|
||||
}
|
||||
|
||||
void Set_Msg()
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_ServerMailData.Msg))
|
||||
{
|
||||
var itemdata = table_itemlist.Ins.Get_Data(m_ServerMailData.ItemID);
|
||||
if (itemdata.e_ItemType == eItem.Shop)
|
||||
{
|
||||
texts[1].text = itemdata.Get_Name();
|
||||
return;
|
||||
}
|
||||
}
|
||||
texts[1].text = m_ServerMailData.Msg;
|
||||
}
|
||||
|
||||
public void OnClick_GetReward()
|
||||
{
|
||||
var id = m_ServerMailData.ItemID;
|
||||
|
|
@ -36,6 +50,7 @@ public class MailCard : CardBase
|
|||
ToastUI.Ins.Set(144);
|
||||
break;
|
||||
default:
|
||||
// TODO 정인호 : 상점 패키지 확인 필요
|
||||
sinfo.m_ServerData.Add_Item(id, amount);
|
||||
sinfo.Write(() => { ObtainItemUI.Ins.Set(new ItemSimpleData { itemid = id, amount = amount }); });
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ public class AllPassUI : BackKeyAdd
|
|||
if (!CanBuy) return;
|
||||
|
||||
NetWait.Ins.Set(true);
|
||||
InappInfo.Ins.Buy_InappItem(m_ShopTableData.InappID, () =>
|
||||
{
|
||||
NetWait.Ins.Set(false);
|
||||
Set_Off();
|
||||
GameUI.Ins.LobbyUI.Get_PassUI().Set();
|
||||
});
|
||||
//InappInfo.Ins.Buy_InappItem(m_ShopTableData.InappID, () =>
|
||||
//{
|
||||
// NetWait.Ins.Set(false);
|
||||
// Set_Off();
|
||||
// GameUI.Ins.LobbyUI.Get_PassUI().Set();
|
||||
//});
|
||||
}
|
||||
|
||||
public override void OnClick_Back()
|
||||
|
|
|
|||
|
|
@ -137,11 +137,11 @@ public class PassContent : ScrollViewMgr
|
|||
{
|
||||
var shopdata = table_shop.Ins.Get_Data(eItem.Pass, passtype);
|
||||
NetWait.Ins.Set(true);
|
||||
InappInfo.Ins.Buy_InappItem(shopdata.InappID, () =>
|
||||
{
|
||||
NetWait.Ins.Set(false);
|
||||
Set();
|
||||
});
|
||||
//InappInfo.Ins.Buy_InappItem(shopdata.InappID, () =>
|
||||
//{
|
||||
// NetWait.Ins.Set(false);
|
||||
// Set();
|
||||
//});
|
||||
}
|
||||
else
|
||||
ToastUI.Ins.Set(23);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ public class ShopCard : CardBase
|
|||
{
|
||||
base.Set(_base);
|
||||
m_Data = _base as ShopItemListTableData;
|
||||
Set();
|
||||
}
|
||||
|
||||
public override void Set()
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
|
||||
texts[0].text = m_Data.Get_Name();
|
||||
|
|
@ -47,6 +52,19 @@ public class ShopCard : CardBase
|
|||
{
|
||||
if (m_Data.b_Package)
|
||||
NewGameUI.Ins.m_ShopUI.m_ShopPackagePopup.Set(m_Data);
|
||||
else
|
||||
{
|
||||
switch (m_Data.n_PriceItemID)
|
||||
{
|
||||
case -2: // 현금
|
||||
InappInfo.Ins.Buy_InappItem(m_Data, () =>
|
||||
{
|
||||
NetWait.Ins.Set(false);
|
||||
Set();
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
public class ShopUI : BotMenuBase
|
||||
{
|
||||
public TabUIBase Tab_Main, Tab_Sub;
|
||||
public ShopContentBase[] shopContents;
|
||||
public ShopContentBase shopContents;
|
||||
public ShopPackagePopup m_ShopPackagePopup;
|
||||
|
||||
public override void Set()
|
||||
|
|
@ -33,10 +33,11 @@ public class ShopUI : BotMenuBase
|
|||
|
||||
void OnClick_SubTab()
|
||||
{
|
||||
for (int i = 0; i < shopContents.Length; i++) shopContents[i].gameObject.SetActive(false);
|
||||
//for (int i = 0; i < shopContents.Length; i++) shopContents[i].gameObject.SetActive(false);
|
||||
|
||||
var mainIndex = Tab_Main.Get_Index();
|
||||
var mainshopdata = table_shopitemlist.Ins.Get_Data(mainIndex);
|
||||
shopContents[mainIndex].Set(mainIndex, Tab_Sub.Get_Index());
|
||||
//shopContents[mainIndex].Set(mainIndex, Tab_Sub.Get_Index());
|
||||
shopContents.Set(mainIndex, Tab_Sub.Get_Index());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue