From 3bced067a4144381e59ce4bd0eb749eeff5ad1f4 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 28 Mar 2019 08:56:15 +0800 Subject: *misc --- source/libs/asura-lib-utils/io/io_task.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'source/libs/asura-lib-utils/io/io_task.cpp') diff --git a/source/libs/asura-lib-utils/io/io_task.cpp b/source/libs/asura-lib-utils/io/io_task.cpp index a96c293..1a50e56 100644 --- a/source/libs/asura-lib-utils/io/io_task.cpp +++ b/source/libs/asura-lib-utils/io/io_task.cpp @@ -1,5 +1,8 @@ #include "io_task.h" +using namespace AEScripting; +using namespace Luax; + namespace AsuraEngine { namespace IO @@ -20,9 +23,17 @@ namespace AsuraEngine return true; } - void IOTask::Invoke() + void IOTask::Invoke(lua_State* thread) { - + if (mCallback) + { + LuaxScopedState state(thread); + if (PushLuaxMemberRef(state, mCallback)) + { + PushLuaxMemberRef(state, mDstRef); + state.Call(1, 0); + } + } } } -- cgit v1.1-26-g67d0