2014年9月5日

Cocos2dx-lua实现单例设计模式

摘要: 定义一个单例类新建一个lua文件,命名为MyDirector.lua,代码如下:module("MyDirector",package.seeall)-- 成员变量local instance = nilprint("load MyDirector")-- 静态方法(不需要传self)functio... 阅读全文

posted @ 2014-09-05 11:57 linchaolong 阅读(1350) 评论(0) 推荐(0) 编辑

导航