码迷,mamicode.com
首页 > 其他好文 > 详细

cocos2dxlua scene

时间:2015-02-27 06:41:21      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:

require "Cocos2d"
require "Cocos2dConstants"

local TestScene = class("TestScene",function()
    return cc.Scene:create()
end)

function TestScene.create()
    local scene = TestScene.new()
    return scene
end


return TestScene

 

 

    
    local scene = require("TestScene")
    local testScene = scene.create()

    if cc.Director:getInstance():getRunningScene() then
        cc.Director:getInstance():replaceScene(testScene)
    else
        cc.Director:getInstance():runWithScene(testScene)
    end

 

cocos2dxlua scene

标签:

原文地址:http://www.cnblogs.com/yufenghou/p/4302490.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!