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