将js的事件循环改回由unity触发
This commit is contained in:
parent
2de4391966
commit
f36a6e4c07
@ -222,22 +222,22 @@ extern "C"
|
||||
}
|
||||
void tick(float dt)
|
||||
{
|
||||
// if (_isStarted)
|
||||
// {
|
||||
// schedule_task_into_server_thread_task_queue(&gasync, [=]()
|
||||
// { JcWallet::getInstance()->tick(dt); });
|
||||
// JcWallet::getInstance()->tickRun();
|
||||
// }
|
||||
if (_isStarted)
|
||||
{
|
||||
schedule_task_into_server_thread_task_queue(&gasync, [=]()
|
||||
{ JcWallet::getInstance()->tick(dt); });
|
||||
JcWallet::getInstance()->tickRun();
|
||||
}
|
||||
}
|
||||
|
||||
void tick2(float dt)
|
||||
{
|
||||
if (_isStarted)
|
||||
{
|
||||
schedule_task_into_server_thread_task_queue(&gasync, [=]()
|
||||
{ JcWallet::getInstance()->tick(dt); });
|
||||
JcWallet::getInstance()->tickRun();
|
||||
}
|
||||
// if (_isStarted)
|
||||
// {
|
||||
// schedule_task_into_server_thread_task_queue(&gasync, [=]()
|
||||
// { JcWallet::getInstance()->tick(dt); });
|
||||
// JcWallet::getInstance()->tickRun();
|
||||
// }
|
||||
}
|
||||
|
||||
int runWalletMethod(const char *funId, const char *methodName, int paramCount, char **paramList)
|
||||
|
@ -146,8 +146,8 @@ public class MainActivity extends UnityPlayerActivity
|
||||
PayClient payClient = PayClient.getInstance();
|
||||
payClient.init(this);
|
||||
mWalletUtil = new WalletUtil(this);
|
||||
JSTimers timer = new JSTimers(Looper.getMainLooper());
|
||||
timer.sendEmptyMessage(JSTimers.JS_TICK);
|
||||
// JSTimers timer = new JSTimers(Looper.getMainLooper());
|
||||
// timer.sendEmptyMessage(JSTimers.JS_TICK);
|
||||
}
|
||||
|
||||
@Override protected void onResume(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user