![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
quick cocos2dx
下巴
the point is null
展开
-
浅析Lua中table的遍历和删除(转)
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://rangercyh.blog.51cto.com/1444712/1032925当我在工作中使用lua进行开发时,发现在lua中有4种方式遍历一个table,当然,从本质上来说其实都一样,只是形式不同,这四种方式分别是:for key, value in pairs转载 2015-01-07 11:27:36 · 13212 阅读 · 0 评论 -
lua如何产生随机数,以及需要注意的问题
LUA中的自带函数库中有两个关于随机数的函数,一个是random,一个是randomseed。random有两个参数,用来设置随机数的范围,比如random(1,100)设置随机数的范围为1至100之间。(random函数说明)This function is an interface to the simple pseudo-random generator function ran原创 2015-01-14 10:04:17 · 26138 阅读 · 0 评论