【Bug】IAP没有恢复购买、去掉UI相机适配脚本
parent
12146441c1
commit
bd27ea089c
|
@ -134,7 +134,6 @@ GameObject:
|
|||
- component: {fileID: 123179489}
|
||||
- component: {fileID: 123179488}
|
||||
- component: {fileID: 123179486}
|
||||
- component: {fileID: 123179490}
|
||||
m_Layer: 0
|
||||
m_Name: UICamera
|
||||
m_TagString: Untagged
|
||||
|
@ -252,18 +251,6 @@ Transform:
|
|||
m_Children: []
|
||||
m_Father: {fileID: 2081420527}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &123179490
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 123179485}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fff49514adc6448d0a4cbea3ff37308b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &158007422
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -45,6 +45,7 @@ public abstract class GuideStepBase
|
|||
/// </summary>
|
||||
public async void StartGuide()
|
||||
{
|
||||
GuideMananger.Instance.IsGuiding = true;
|
||||
await UniTask.Delay(500); // 延迟时间开始
|
||||
DoBeforeGuide();
|
||||
SubStartGuide();
|
||||
|
@ -116,6 +117,5 @@ internal sealed class WinLevel : GuideStepBase
|
|||
|
||||
protected override void SubStartGuide()
|
||||
{
|
||||
GuideMananger.Instance.IsGuiding = true;
|
||||
}
|
||||
}
|
|
@ -12,7 +12,6 @@ public class IAPHandle : IStoreListener
|
|||
private const string Environment = "production";
|
||||
public Action<string> SendReceiptAction;
|
||||
public Action<string> SetApplicationUseId;
|
||||
public Action<string> OnBreakPurchase;
|
||||
public bool ClientVerify;
|
||||
public List<string> ConsumableGoods;
|
||||
public List<string> NonConsumableGoods;
|
||||
|
@ -24,6 +23,7 @@ public class IAPHandle : IStoreListener
|
|||
private IGooglePlayStoreExtensions _googlePlayStoreExtensions;
|
||||
private Action<string> _onPurchaseSuccess;
|
||||
private Action _onPurchaseFail;
|
||||
public Action<string> OnRestorePurchase;
|
||||
private bool _isInitialized;
|
||||
|
||||
/// <summary>
|
||||
|
@ -198,7 +198,14 @@ public class IAPHandle : IStoreListener
|
|||
}
|
||||
else
|
||||
{
|
||||
_onPurchaseSuccess?.Invoke(_curProduct);
|
||||
if (_onPurchaseSuccess != null)
|
||||
{
|
||||
_onPurchaseSuccess.Invoke(_curProduct);
|
||||
}
|
||||
else
|
||||
{
|
||||
OnRestorePurchase?.Invoke(_curProduct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,7 +227,14 @@ public class IAPHandle : IStoreListener
|
|||
}
|
||||
else
|
||||
{
|
||||
_onPurchaseSuccess?.Invoke(_curProduct);
|
||||
if (_onPurchaseSuccess != null)
|
||||
{
|
||||
_onPurchaseSuccess.Invoke(_curProduct);
|
||||
}
|
||||
else
|
||||
{
|
||||
OnRestorePurchase?.Invoke(_curProduct);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,11 +15,11 @@ public class IAPManager : Singlenton<IAPManager>
|
|||
/// 添加商品并初始化IAP
|
||||
/// </summary>
|
||||
public void AddGoods(List<string> consumableGoods, List<string> nonConsumableGoods,
|
||||
Action<string> onBreakPurchase = null)
|
||||
Action<string> onRestorePurchase = null)
|
||||
{
|
||||
_helper.ConsumableGoods = consumableGoods;
|
||||
_helper.NonConsumableGoods = nonConsumableGoods;
|
||||
_helper.OnBreakPurchase = onBreakPurchase;
|
||||
_helper.OnRestorePurchase = onRestorePurchase;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -103,10 +103,10 @@ namespace Gameplay.LoadingExecutor
|
|||
await UIManager.Instance.OpenWindow(UIConstants.UIStartMain);
|
||||
|
||||
//用户协议 -> 登录 -> 数据同步
|
||||
if (AppInfoManager.Instance.UpdateConfirm)
|
||||
if (AppInfoManager.Instance.UpdateConfirm && !GuideMananger.Instance.IsGuiding)
|
||||
await UIManager.Instance.OpenWindow(UIConstants.UISyncTip);
|
||||
|
||||
if (!AppInfoManager.Instance.CheckIfLogin() && !LoginManager.Instance.ShowLogin)
|
||||
if (!AppInfoManager.Instance.CheckIfLogin() && !LoginManager.Instance.ShowLogin && !GuideMananger.Instance.IsGuiding)
|
||||
await UIManager.Instance.OpenWindow(UIConstants.UILogin);
|
||||
|
||||
if (!PlayerPrefs.HasKey(LevelConstants.FirstLaunch))
|
||||
|
|
Loading…
Reference in New Issue