From 1456a08003fabdeb1426ec39a0fbab1a7e038b1e Mon Sep 17 00:00:00 2001 From: huyufei Date: Wed, 7 Aug 2024 23:16:05 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyufei --- Runtime/GuruIAP/Runtime/Code/IAPModel.cs | 16 +++++++++++++++- Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs | 6 +++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Runtime/GuruIAP/Runtime/Code/IAPModel.cs b/Runtime/GuruIAP/Runtime/Code/IAPModel.cs index 5bf90ee..2adaa8e 100644 --- a/Runtime/GuruIAP/Runtime/Code/IAPModel.cs +++ b/Runtime/GuruIAP/Runtime/Code/IAPModel.cs @@ -234,7 +234,21 @@ namespace Guru } #endregion - + + #region ClearData + + public void ClearData() + { + googleOrders.Clear(); + appleOrders.Clear(); + androidTokens.Clear(); + iosReceipts.Clear(); + buyCount = 0; + isIapUser = false; + Save(); + } + + #endregion } diff --git a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs index 9e83a40..5c67547 100644 --- a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs +++ b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs @@ -52,7 +52,10 @@ namespace Guru } - private IAPModel _model; + protected IAPModel _model; + + + /// /// 是否是首次购买 /// @@ -1367,6 +1370,7 @@ namespace Guru } #endregion + } } \ No newline at end of file