更新BridgeFunc
This commit is contained in:
@@ -61,8 +61,11 @@ namespace tysdk
|
||||
|
||||
public static void FBShareLink(string title, string content, string url) { }
|
||||
public static void MessengerShareLink(string title, string content, string url) { }
|
||||
|
||||
|
||||
|
||||
private static string EAccountTypeToStr(EAccoutType accoutType)
|
||||
{
|
||||
return accoutType == EAccoutType.hwVkid ? AccountInfo.hwVkid : accoutType.ToString();
|
||||
}
|
||||
|
||||
#elif UNITY_ANDROID
|
||||
|
||||
@@ -107,21 +110,12 @@ namespace tysdk
|
||||
|
||||
public static void UnityLogin(EAccoutType accoutType)
|
||||
{
|
||||
var accountInfo = EAccountTypeToStr(accoutType);
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnityLogin",accountInfo);
|
||||
}
|
||||
|
||||
if (accoutType == EAccoutType.hwVkid)
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnityLogin",AccountInfo.hwVkid);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnityLogin", accoutType.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void UnityGetIdentityFun(string type)
|
||||
@@ -135,23 +129,20 @@ namespace tysdk
|
||||
public static void UnityLogOutByChannel(EAccoutType accoutType)
|
||||
{
|
||||
|
||||
var accountInfo = EAccountTypeToStr(accoutType);
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnityLogOutByChannel", accoutType.ToString());
|
||||
sdkManager.CallStatic("UnityLogOutByChannel", accountInfo);
|
||||
}
|
||||
}
|
||||
|
||||
public static void LinkAccount(EAccoutType accoutType)
|
||||
{
|
||||
string userId = TYSdkFacade.TYAccountInfo.strUserId;
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
if (accoutType == EAccoutType.hwVkid)
|
||||
using (var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("LinkAccount",AccountInfo.hwVkid,userId);
|
||||
}
|
||||
else
|
||||
{
|
||||
sdkManager.CallStatic("LinkAccount", accoutType.ToString(), userId);
|
||||
var accountInfo = EAccountTypeToStr(accoutType);
|
||||
sdkManager.CallStatic("LinkAccount",accountInfo,userId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,32 +158,19 @@ namespace tysdk
|
||||
|
||||
public static void ChangeLinkAccount(EAccoutType accoutType, int oldUserId, int newUserId)
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
if (accoutType == EAccoutType.hwVkid)
|
||||
var accountInfo = EAccountTypeToStr(accoutType);
|
||||
using (var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("ChangeLinkAccount",AccountInfo.hwVkid,oldUserId,newUserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
sdkManager.CallStatic("ChangeLinkAccount", accoutType.ToString(), oldUserId, newUserId);
|
||||
sdkManager.CallStatic("ChangeLinkAccount", accountInfo, oldUserId, newUserId);
|
||||
}
|
||||
}
|
||||
|
||||
public static void LinkCheck(EAccoutType accoutType)
|
||||
{
|
||||
if (accoutType == EAccoutType.hwVkid)
|
||||
var accountInfo = EAccountTypeToStr(accoutType);
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("LinkCheck",AccountInfo.hwVkid);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("LinkCheck", accoutType.ToString());
|
||||
}
|
||||
sdkManager.CallStatic("LinkCheck",accountInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user