Lua
火苗999℃
囧囧有神
展开
-
lua模拟消息循环
lua模拟消息循环 --消息循环 单例 --[[ --使用方法 local message = require("scripts.app.Node.MessageManager") message:PostMessage(message) num = time / dt message:PostDelayMessage(message, n原创 2014-10-17 14:13:21 · 712 阅读 · 0 评论 -
Lua单例
Lua单例 --单例1 local Singleton = class("Singleton") Singleton.type_ = "Singleton" function Singleton:GetInstance() local o = _G.Singleton print("old") if o then return o end转载 2014-10-16 11:52:21 · 911 阅读 · 0 评论 -
lua实现的循环背景
local GameBackGround = class("GameBackGround", function() return display.newLayer("GameBackGround") end) GameBackGround.bk_ = {} GameBackGround.bkSize_ = 0 function GameBackGround:ctor()原创 2014-10-21 14:25:15 · 823 阅读 · 0 评论 -
quick-lua创建骨骼动画
local Skeleton = class("Skeleton", function() return display.newSprite() end) function Skeleton:ctor() -- 加载骨骼资源 ccs.ArmatureDataManager:getInstance():addArmatureFileInfo("cyborg.原创 2014-10-20 15:40:51 · 668 阅读 · 0 评论