diff options
author | chai <chaifix@163.com> | 2018-11-14 21:21:54 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-14 21:21:54 +0800 |
commit | 611d12bdd245dd43b7434661d3e24f2b435378cb (patch) | |
tree | 976904a325695f76680934c0d917ee664e1529d5 /src/lua/modules/graphics/je_lua_graphics.cpp | |
parent | 84aea028f9955c9313fa14b62d39a3e8e80b84b7 (diff) |
*更新渲染模块
Diffstat (limited to 'src/lua/modules/graphics/je_lua_graphics.cpp')
-rw-r--r-- | src/lua/modules/graphics/je_lua_graphics.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lua/modules/graphics/je_lua_graphics.cpp b/src/lua/modules/graphics/je_lua_graphics.cpp index d129e6a..6b84651 100644 --- a/src/lua/modules/graphics/je_lua_graphics.cpp +++ b/src/lua/modules/graphics/je_lua_graphics.cpp @@ -678,10 +678,10 @@ namespace JinEngine { Proxy* pxySSheet = luax_newinstance(L, JIN_GRAPHICS_SPRITESHEET); Graphic* graphic = pxyGraphic->getObject<Graphic>(); - Shared<SpriteSheet>& shrSSheet = pxySSheet->getShared<SpriteSheet>(); + Shared<SpriteSheet>* shrSSheet = new Shared<SpriteSheet>(new SpriteSheet(graphic), JIN_GRAPHICS_SPRITESHEET); Shared<Graphic>& shrGraphic = pxyGraphic->getShared<Graphic>(); - shrSSheet.setDependency(SpriteSheetDependency::DEP_GRAPHIC, &shrGraphic); - pxySSheet->bind(new Shared<SpriteSheet>(new SpriteSheet(graphic), JIN_GRAPHICS_SPRITESHEET)); + shrSSheet->setDependency((int)SpriteSheetDependency::DEP_GRAPHIC, &shrGraphic); + pxySSheet->bind(shrSSheet); return 1; } else @@ -776,6 +776,7 @@ namespace JinEngine luax_newclass(L, luaopen_Page); luax_newclass(L, luaopen_JSL); luax_newclass(L, luaopen_Sprite); + luax_newclass(L, luaopen_SpriteSheet); luaL_Reg f[] = { /* window */ |