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