Compare commits

...

7 Commits

Author SHA1 Message Date
zhangaotian e0adc8f70c 【Shop】关闭IAP、商店初始化 2024-08-14 14:28:06 +08:00
zhangaotian 6cd54c950c 【商店】关闭购买 2024-08-14 14:19:13 +08:00
zhangaotian 2aa784d4e7 【资源】金币不足 2024-08-14 14:18:52 +08:00
zhangaotian a6facbe5ee 【商品】安卓 2024-08-14 12:56:04 +08:00
zhangaotian 4829a07f94 【商店】更新商店 2024-08-14 12:31:54 +08:00
zhangaotian 57ce6b6c20 【内购】 2024-08-13 16:52:23 +08:00
zhangaotian a2d1b18698 【内购】安卓商品 2024-08-13 16:20:17 +08:00
16 changed files with 890 additions and 765 deletions

File diff suppressed because one or more lines are too long

View File

@ -236,7 +236,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &490868100481984922
RectTransform:
m_ObjectHideFlags: 0
@ -328,7 +328,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 141.97205, y: 0.4258}
m_AnchoredPosition: {x: 168.3, y: 0.000018746}
m_SizeDelta: {x: 145.5363, y: 62.7726}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8790278160148953539
@ -423,7 +423,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_margin: {x: -21.967468, y: 0, z: -25.482178, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0

View File

@ -755,7 +755,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &2506899326898321492
RectTransform:
m_ObjectHideFlags: 0

View File

@ -406,5 +406,11 @@
"Key": "Guide_108",
"Value": "保存更改",
"Value_En": "Save changes"
},
{
"ID": 169,
"Key": "Tip_Coin",
"Value": "金币不足!",
"Value_En": "Not enough gold!"
}
]

View File

@ -70,4 +70,5 @@ QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm

View File

@ -25,7 +25,7 @@ namespace Gameplay.Game
#endif
AdSDKManager.Instance.ConfigureBeforeInit(unityAdsGameID);
AdSDKManager.Instance.Init();
IAPManager.Instance.Init();
//IAPManager.Instance.Init();
DontDestroyOnLoad(gameObject);
_game = new Forest_MyGame();

View File

@ -24,7 +24,7 @@ namespace Gameplay.LoadingExecutor
{
AppInfoManager.Instance.InitRemoteInfo();
_destProgress = 10f;
ShopManager.Instance.Init();
//ShopManager.Instance.Init();
_destProgress = 20f;
await TableManager.Instance.Load();
_destProgress = 30f;

View File

@ -13,7 +13,6 @@ namespace Gameplay.Manager
public class ShopManager : Singlenton<ShopManager>, IInitable
{
private Dictionary<PropType, int> _unusedPropCount;
public string Platform = "ios";
public bool IsDebug;
private Dictionary<string, int> _consumableGoods;
@ -40,21 +39,28 @@ namespace Gameplay.Manager
InitProducts();
//_sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.IAP) as IBuyServices;
IAPManager.Instance.SetClientVerify(true);
IAPManager.Instance.AddGoods(_consumableGoods.Keys.ToList(), _nonConsumableGoods.Keys.ToList(), OnRestorePurchase);
IAPManager.Instance.AddGoods(_consumableGoods.Keys.ToList(), _nonConsumableGoods.Keys.ToList(),
OnRestorePurchase);
_init = true;
}
private void InitProducts()
{
#if UNITY_ANDROID
Platform = "android";
#endif
_consumableGoods = new Dictionary<string, int>()
{
{ Platform + "_CoinBox_100", 100 }, { Platform + "_CoinBox_600", 600 },
{ Platform + "_CoinBox_1600", 1600 }
{ "android_coinbox_100", 100 }, { "android_coinbox_600", 600 },
{ "android_coinbox_1600", 1600 }
};
_nonConsumableGoods = new Dictionary<string, int>();
#else
_consumableGoods = new Dictionary<string, int>()
{
{ "ios_CoinBox_100", 100 }, { "ios_CoinBox_600", 600 },
{ "ios_CoinBox_1600", 1600 }
};
_nonConsumableGoods = new Dictionary<string, int>();
#endif
}
public void BuyGoods(string goodsID)

View File

@ -85,6 +85,7 @@ public class IAPHandle : IStoreListener
//Add Product
foreach (var consumableGoods in ConsumableGoods)
{
DebugUtil.Log("添加商品:{0}", consumableGoods);
builder.AddProduct(consumableGoods, ProductType.Consumable);
}

View File

@ -3,9 +3,9 @@
namespace UnityEngine.Purchasing.Security {
public class GooglePlayTangle
{
private static byte[] data = System.Convert.FromBase64String("fyyNihprm2GhgfNBjcqWUvKdJ64Et4TPT5jzm9DqVpGvMrhGGi7Hi6opJygYqikiKqopKSiP7KNI0RIuA2Q2O1O9hBvAdrEuVxizj6MZpS3vcn6qegkc4iARLEnx3UAeMJt/NfeDIN7eD5pbItbdU9bILWeiKoSYGKopChglLiECrmCu3yUpKSktKCuS06pyC5bSm9ODgMZu75ntlgojS6I0lotG0pFu4rLNesVaisgGAuk5oT15ZoZXV9GkOaWwCacR6VMpNtf1cFsEo+lgdvI0oc1fcuMa3Eh2nkA23+S7xnnijp7Rpv63NmLl1xljY9xwqd6NhB0U98dGCCeJKDeaS1JKqIEdlUxPuq8hy8R1eXFX4iEmQTNBd13BhDbonyorKSgp");
private static int[] order = new int[] { 9,10,10,13,6,6,9,7,11,11,13,12,13,13,14 };
private static int key = 40;
private static byte[] data = System.Convert.FromBase64String("p8Iat1lzD8htsrjlXDjfWYdvCBetkymHF9DuByzFAu6gGOG7IckwrW6PlE14bAATszimXjGGt/K2akWFaG1ABP3sR0oqoZ0Nt4U9DgovSBsaPQE/DPQ+tMMjayx//O6vXpJPu2YdaXbpkJlCV/sH8j0yKi1ek1whnzls+7MIaF1NI6MWk5l/P7jZ+W/iYW9gUOJhamLiYWFggkIKg05oXaLB72kBbDojaasRCPKZrlGGfX1Ygt2Ipt6M/Q0RSUJymf+l16eMUedQ4mFCUG1maUrmKOaXbWFhYWVgY2Dzi8f8aG94rUJ0FAG4SFlvms0Jicpemo7xAYqt27GInhB96Occz7qSrxNQ8PxVwK8F+j1LD/oy3EscBCIpS6er6gukJ2JjYWBh");
private static int[] order = new int[] { 10,2,12,11,5,5,6,12,13,13,10,12,13,13,14 };
private static int key = 96;
public static readonly bool IsPopulated = true;

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c8a92aa6f21d143e5804e371270d1398
guid: 03dcef508fb4741aab357733b9625788
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -17,30 +17,41 @@ public class UIMainShopController : UIWindow
protected override void OnAwake()
{
var platform = ShopManager.Instance.Platform;
EventManager.Instance.Register(EventManager.EventName.RefreshCoin, RefreshCoins);
_rawImageGaussianBlurMask = GetComponent<RawImage>("GaussianBlurMask");
_txtCoins = FindObj("UI_LiuHaiTop/CoinBar/Txt_CoinNumber").GetComponent<TextMeshProUGUI>();
BindButton("MainShop/Btn_Close", OnWindowClose);
BindButton("MainShop/CoinsList/Viewport/Content/CoinSmallPack/Btn_Buy", () =>
{
_biEventFirst = EventFirst.fte_buy_coin_small;
_biEvent = Event.click_buy_coin_small;
ShopToBuy(platform + "_CoinBox_100");
#if UNITY_ANDROID
ShopToBuy("android_coinbox_100");
#else
ShopToBuy("ios_CoinBox_100");
#endif
});
BindButton("MainShop/CoinsList/Viewport/Content/CoinMediumPack/Btn_Buy", () =>
{
_biEventFirst = EventFirst.fte_buy_coin_medium;
_biEvent = Event.click_buy_coin_medium;
ShopToBuy(platform + "_CoinBox_600");
#if UNITY_ANDROID
ShopToBuy("android_coinbox_600");
#else
ShopToBuy("ios_CoinBox_600");
#endif
});
BindButton("MainShop/CoinsList/Viewport/Content/CoinLargePack/Btn_Buy", () =>
{
_biEventFirst = EventFirst.fte_buy_coin_large;
_biEvent = Event.click_buy_coin_large;
ShopToBuy(platform + "_CoinBox_1600");
#if UNITY_ANDROID
ShopToBuy("android_coinbox_1600");
#else
ShopToBuy("ios_CoinBox_1600");
#endif
});
}
@ -56,7 +67,7 @@ public class UIMainShopController : UIWindow
EventManager.Instance.Send(EventManager.EventName.HideGfx);
GfxManager.Instance.LoadGfx("Effect_Sequin");
}
private void OnWindowClose()
{
CloseWindow(true);

View File

@ -183,9 +183,15 @@ public class UIBuyGoodsController : UIWindow
}
else
{
await UIManager.Instance.OpenWindow(UIConstants.UIShop);
await UIManager.Instance.OpenWindow(UIConstants.UITips, "Tip_Coin", () =>
{
CloseWindow();
LevelManager.Instance.IsPause = false;
});
/*await UIManager.Instance.OpenWindow(UIConstants.UIShop);
BIManager.Instance.TrackEvent(Event.open_shop, "InLevel");
BIManager.Instance.TrackEventOnce(EventFirst.fte_open_shop, "InLevel");
BIManager.Instance.TrackEventOnce(EventFirst.fte_open_shop, "InLevel");*/
}
}
}

View File

@ -1,26 +1,26 @@
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/ad_adconfig.json,A36B3A44ABABA2DDE095849E3626C9,1094,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/guide_guideconfig.json,691B15CC18B4441293DFB6BEAE8965,2512,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/prop_propconfig.json,7C02F583533F144939CBFF8C7E18473,880,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/stringcfg_stringconfig.json,F8D8B4B06DC867925B8F57951291E16C,8524,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/ADConfig.cs,A4C9CBC6BD55B1C14634FD73C748ACA,1928,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/ADType.cs,F6A7395BDA6D1E7D1EF51E344CB045,603,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/DataAD.cs,7F68864C5AB693111C5C3250967FB782,3417,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/BI/Event.cs,9BC756F4D9E749FBCEF49BF6929557,6506,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/BI/EventFirst.cs,72E992B782D0734B64364E4777CA3B35,2964,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/DataGuide.cs,A23BB4F3F93B395441BB83D74E59B6F,4292,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/GuideConfig.cs,B1779443C4E6B0FD80A8B0CAE418015,2003,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/GuideStepType.cs,BEB85D16C8FEBFBE0679C7F9C9F9A8,606,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/StepCompleteType.cs,C360B48BE0179D52C15D41892A4B,1008,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/DataProp.cs,B1E5165AD7B7B28F863BF25E9581BF7B,4385,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/PropConfig.cs,263DA0E1E0FA37A6401A432E49E8,2040,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/PropType.cs,56DDB93BC3D6491F012DAE849526897,757,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/StringCfg/DataString.cs,1613DCE5B077AE52BB90193DD949348,2327,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/StringCfg/StringConfig.cs,90AC6ED26EAF4A66498B4816B635F47,2080,1722237804796
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Tables.cs,16F3D2F3A20B0D35793F8A5A8194E59,2303,1722237804795
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/ad_adconfig.json,A36B3A44ABABA2DDE095849E3626C9,1094,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/guide_guideconfig.json,F0B7F2CC3D5E8E1F289E6F854F40E2,2491,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/prop_propconfig.json,7C02F583533F144939CBFF8C7E18473,880,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/stringcfg_stringconfig.json,F1DE33A5B922A3DDE9A415397E854250,8636,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/ADConfig.cs,A4C9CBC6BD55B1C14634FD73C748ACA,1928,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/ADType.cs,F6A7395BDA6D1E7D1EF51E344CB045,603,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/DataAD.cs,7F68864C5AB693111C5C3250967FB782,3417,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/BI/Event.cs,9BC756F4D9E749FBCEF49BF6929557,6506,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/BI/EventFirst.cs,72E992B782D0734B64364E4777CA3B35,2964,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/DataGuide.cs,A23BB4F3F93B395441BB83D74E59B6F,4292,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/GuideConfig.cs,B1779443C4E6B0FD80A8B0CAE418015,2003,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/GuideStepType.cs,BEB85D16C8FEBFBE0679C7F9C9F9A8,606,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/StepCompleteType.cs,C360B48BE0179D52C15D41892A4B,1008,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/DataProp.cs,B1E5165AD7B7B28F863BF25E9581BF7B,4385,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/PropConfig.cs,263DA0E1E0FA37A6401A432E49E8,2040,1723616194219
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/PropType.cs,56DDB93BC3D6491F012DAE849526897,757,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/StringCfg/DataString.cs,1613DCE5B077AE52BB90193DD949348,2327,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/StringCfg/StringConfig.cs,90AC6ED26EAF4A66498B4816B635F47,2080,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Tables.cs,16F3D2F3A20B0D35793F8A5A8194E59,2303,1723616194218
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__beans__.xlsx,FBF2DDFEE7FB39A727F2C3ACA7E228E,11821,1718685908733
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__enums__.xlsx,BB1B7B4C814680E15D54B12E0C4BAD5,12703,1721893666572
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__tables__.xlsx,CA2D48B6B6FAC5A9F046ACE375EA6A5B,11099,1721709912370
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/AD.xlsx,D49DD4C2226B1AED21398727B2144A9,9832,1721801067448
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/Guide.xlsx,6D5F7C64D1471860B08AE8329061BF22,10476,1722237740607
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__enums__.xlsx,BB1B7B4C814680E15D54B12E0C4BAD5,12703,1722244651038
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__tables__.xlsx,CA2D48B6B6FAC5A9F046ACE375EA6A5B,11099,1722244651039
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/AD.xlsx,D49DD4C2226B1AED21398727B2144A9,9832,1722244651037
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/Guide.xlsx,EFF399A2B66C639A70B9956CB653A6D3,10462,1723616171763
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/Prop.xlsx,518794514E27F37BF9D0B6BA712533A5,10050,1718685908733
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/StringConfig.xlsx,62DA844EBD5C633CDE4C4826863712,13506,1722237783694
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/StringConfig.xlsx,98D2191EAFD292EBEA0D6FFBD8B890,13563,1723615437867

Binary file not shown.

Binary file not shown.