From e1bc01ce6948283930f7f29a640a91a27a29c997 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 4 Dec 2018 14:10:29 +0800 Subject: =?UTF-8?q?*=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/modules/graphics/je_lua_animator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lua/modules/graphics/je_lua_animator.cpp') diff --git a/src/lua/modules/graphics/je_lua_animator.cpp b/src/lua/modules/graphics/je_lua_animator.cpp index 43a1f50..c8dd420 100644 --- a/src/lua/modules/graphics/je_lua_animator.cpp +++ b/src/lua/modules/graphics/je_lua_animator.cpp @@ -85,10 +85,11 @@ namespace JinEngine LUA_IMPLEMENT int l_setAnimation(lua_State* L) { - SharedAnimator shrAnimator = checkAnimator(L); + LuaObject* luaAnimator = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Animator); + SharedAnimator shrAnimator = luaAnimator->getShared(); LuaObject* luaObj = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Animation); Shared& shrAnimation = luaObj->getShared(); - shrAnimator.setDependency((int)AnimatorDependency::DEP_ANIMATION, &shrAnimation); + luaAnimator->setDependency((int)AnimatorDependency::DEP_ANIMATION, &shrAnimation); shrAnimator->setAnimation(shrAnimation.getObject()); return 0; } -- cgit v1.1-26-g67d0