[M] all functional
This commit is contained in:
@@ -18,6 +18,9 @@ namespace tysdk
|
||||
//登录
|
||||
public static void UnityLoginByTokenFun(string token){}
|
||||
public static void UnityLogin(EAccoutType accoutType){}
|
||||
public static void LinkAccount(EAccoutType accoutType){}
|
||||
public static void UnlinkAccount(EAccoutType accoutType){}
|
||||
public static void LinkCheck(EAccoutType accoutType){}
|
||||
|
||||
public static void UnityGetIdentityFun(string type){}
|
||||
|
||||
@@ -27,8 +30,9 @@ namespace tysdk
|
||||
string productCount, string prodorderId, string appInfo, string pType) { }
|
||||
|
||||
//支付
|
||||
public static void UnityKnow(string userId, string productId, string productPrice, string productName,
|
||||
string productCount, string prodorderId, string appInfo){}
|
||||
|
||||
public static void UnityKnow(String productId, String productName, String productCount,
|
||||
String prodorderId, String appInfo) {}
|
||||
|
||||
//获取商品列表
|
||||
public static void GetSKUList() { }
|
||||
@@ -81,11 +85,9 @@ namespace tysdk
|
||||
|
||||
public static void UnityLogin(EAccoutType accoutType)
|
||||
{
|
||||
var typeName = GetLoginTypeName(accoutType);
|
||||
Debug.LogError("typeName:::" + typeName);
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnityLogin", typeName);
|
||||
sdkManager.CallStatic("UnityLogin", accoutType.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +101,36 @@ namespace tysdk
|
||||
|
||||
public static void UnityLogOutByChannel(EAccoutType accoutType)
|
||||
{
|
||||
sdkManager.CallStatic("UnityLogOutByChannel", accoutType.ToString());
|
||||
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnityLogOutByChannel", accoutType.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static void LinkAccount(EAccoutType accoutType)
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
string userId = TYSdkFacade.TYAccountInfo.strUserId;
|
||||
sdkManager.CallStatic("LinkAccount", accoutType.ToString(), userId);
|
||||
}
|
||||
}
|
||||
|
||||
public static void UnlinkAccount(EAccoutType accoutType)
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnlinkAccount", accoutType.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static void LinkCheck(EAccoutType accoutType)
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("LinkCheck", accoutType.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
//支付new
|
||||
@@ -113,20 +144,21 @@ namespace tysdk
|
||||
productCount, prodorderId, appInfo,pType);
|
||||
}
|
||||
}
|
||||
|
||||
//支付
|
||||
public static void UnityKnow(string userId, string productId, string productPrice, string productName,
|
||||
string productCount, string prodorderId, string appInfo)
|
||||
|
||||
public static void UnityKnow(String productId, String productName, String productCount, String prodorderId, String appInfo)
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnityKnow",userId, productId, productPrice, productName,
|
||||
productCount, prodorderId, appInfo);
|
||||
sdkManager.CallStatic("UnityKnow", productId, productName, productCount, prodorderId, appInfo);
|
||||
}
|
||||
}
|
||||
|
||||
//获取商品列表
|
||||
public static void GetSKUList()
|
||||
{
|
||||
UnityEngine.Debug.Log("UnityBridgeFunc.GetSKUList()");
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("thirdExtend");
|
||||
@@ -231,6 +263,54 @@ namespace tysdk
|
||||
[DllImport("__Internal")]
|
||||
private static extern void UnityLogoutGuest();
|
||||
|
||||
public static void LinkAccount(EAccoutType accoutType)
|
||||
{
|
||||
switch (accoutType)
|
||||
{
|
||||
case EAccoutType.hwGoogle:
|
||||
LinkGoogle();
|
||||
break;
|
||||
case EAccoutType.hwFacebook:
|
||||
LinkFacebook();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static void UnlinkAccount(EAccoutType accoutType)
|
||||
{
|
||||
switch (accoutType)
|
||||
{
|
||||
case EAccoutType.hwGoogle:
|
||||
UnlinkGoogle();
|
||||
break;
|
||||
case EAccoutType.hwFacebook:
|
||||
UnlinkFacebook();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("__Internal")] private static extern void LinkGoogle();
|
||||
[DllImport("__Internal")] private static extern void UnlinkGoogle();
|
||||
[DllImport("__Internal")] private static extern void LinkFacebook();
|
||||
[DllImport("__Internal")] private static extern void UnlinkFacebook();
|
||||
|
||||
public static void LinkCheck(EAccoutType accoutType)
|
||||
{
|
||||
switch (accoutType)
|
||||
{
|
||||
case EAccoutType.hwGoogle:
|
||||
IsLinkedGoogle();
|
||||
break;
|
||||
case EAccoutType.hwFacebook:
|
||||
IsLinkedFacebook();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("__Internal")] private static extern void IsLinkedGoogle();
|
||||
[DllImport("__Internal")] private static extern void IsLinkedFacebook();
|
||||
|
||||
|
||||
//支付
|
||||
[DllImport("__Internal")]
|
||||
public static extern void UnityKnow(string userId, string productId, string productPrice, string productName,
|
||||
|
||||
Reference in New Issue
Block a user