升级接口

This commit is contained in:
yangjing 2022-04-30 01:23:07 +08:00
parent f4da96b41d
commit 966ca0fc83
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ public class InitLogic : MonoBehaviour
EnterGame(); EnterGame();
#elif IOS_CN #elif IOS_CN
TGTools.Instance.onAgreeHander += ShowAntiAddiction; TGTools.Instance.onAgreeHander += ShowAntiAddiction;
TGTools.Instance.ShowUserAgreementView("卡通剧情", "8"); TGTools.Instance.ShowUserAgreementView("卡通剧情", "8", "https://www.toukagame.com/PrivacyPolicy.html", "https://toukagame.com/agreement.html");
#endif #endif
} }

View File

@ -64,7 +64,7 @@ public class TGTools : ToukaSingletonMonoBehaviour<TGTools>
); );
//用户协议弹框 //用户协议弹框
[DllImport("__Internal")] [DllImport("__Internal")]
private static extern void showUserAgreementView(string contentType,string ageType); private static extern void showUserAgreementView(string contentType,string ageType,string privacy ,string termofservice);
#endif #endif
#endif #endif
@ -253,14 +253,14 @@ public void SetDefaults(string defaults)
/** /**
* age : 8121618 * age : 8121618
*/ */
public void ShowUserAgreementView(string contentType, string ageType) public void ShowUserAgreementView(string contentType, string ageType, string privacy, string termofservice)
{ {
#if UNITY_IPHONE && !UNITY_EDITOR && !NO_SDK && IOS_CN #if UNITY_IPHONE && !UNITY_EDITOR && !NO_SDK && IOS_CN
userAgreementDelegate handler = new userAgreementDelegate(userAgreementAgreeHandle); userAgreementDelegate handler = new userAgreementDelegate(userAgreementAgreeHandle);
IntPtr userAgree = Marshal.GetFunctionPointerForDelegate(handler); IntPtr userAgree = Marshal.GetFunctionPointerForDelegate(handler);
//调用OC的方法将C#的回调方法函数指针传给OC //调用OC的方法将C#的回调方法函数指针传给OC
userAgreementAgreeCallback(userAgree); userAgreementAgreeCallback(userAgree);
showUserAgreementView(contentType,ageType); showUserAgreementView(contentType,ageType,privacy,termofservice);
#endif #endif
} }