mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
79 lines
1.9 KiB
C#
79 lines
1.9 KiB
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class TheTencentAccountDelegate : TheBaseAccountDelegate
|
|
{
|
|
public TheTencentAccountDelegate()
|
|
{
|
|
_activity.Call("runOnUiThread", (AndroidJavaRunnable)delegate
|
|
{
|
|
if (_delegate == null)
|
|
{
|
|
_delegate = new AndroidJavaObject("com.tencent.tmgp.bh3.AgentMain");
|
|
}
|
|
});
|
|
}
|
|
|
|
public override void init(bool debugMode, string callbackClass, string callbackMethod, Function callback)
|
|
{
|
|
_activity.Call("runOnUiThread", (AndroidJavaRunnable)delegate
|
|
{
|
|
_delegate.Call("init", debugMode, _activity, callbackClass, callbackMethod);
|
|
});
|
|
}
|
|
|
|
public override IEnumerator login(string callbackClass, string callbackMethod, string arg1, string arg2, Function callback)
|
|
{
|
|
_activity.Call("runOnUiThread", (AndroidJavaRunnable)delegate
|
|
{
|
|
_delegate.Call("login", callbackClass, callbackMethod);
|
|
});
|
|
return null;
|
|
}
|
|
|
|
public override IEnumerator register(string callbackClass, string callbackMethod, string arg1, string arg2, string arg3, string arg4, Function callback)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public override string getUid()
|
|
{
|
|
return _delegate.Call<string>("getUid", new object[0]);
|
|
}
|
|
|
|
public override void pay(string productID, string productName, float productPrice, string tradeNo, string userID, string notifyUrl, string callbackClass, string callbackMethod, Function callback)
|
|
{
|
|
_activity.Call("runOnUiThread", (AndroidJavaRunnable)delegate
|
|
{
|
|
_delegate.Call("pay", productID, productName, productPrice, tradeNo, userID, notifyUrl, callbackClass, callbackMethod);
|
|
});
|
|
}
|
|
|
|
public override void showToolBar()
|
|
{
|
|
}
|
|
|
|
public override void hideToolBar()
|
|
{
|
|
}
|
|
|
|
public override void showPausePage()
|
|
{
|
|
}
|
|
|
|
public override void showUserCenter()
|
|
{
|
|
}
|
|
|
|
public override void exit()
|
|
{
|
|
_activity.Call("runOnUiThread", (AndroidJavaRunnable)delegate
|
|
{
|
|
_delegate.Call("exit");
|
|
});
|
|
}
|
|
}
|
|
}
|