![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lua
发霉的宅大人
让世界听见中国游戏的声音!
展开
-
Lua中一些常用的数学函数
Lua中常用的一些数学函数如向下取整math.floor(5.3向下取整为整数5)向上取整math.ceil(5.3向上取整为整数6)(下图来源自网络https://www.jianshu.com/p/9a41e9225c7a )如有侵权,请私聊,会立即删除。...原创 2019-02-18 16:49:13 · 1202 阅读 · 0 评论 -
lua中表table的赋值实质为引用
lua代码举例如下local TabA = {["a"] = 1,["b"] = 2}local TabB = TabA--将TabA赋值给TabBprint(TabA.a)print(TabB.a)TabB.a = 5--此处对表TabB进行操作print(TabA.a)print(TabB.a)print("~~~~~~~~~~~~~~~~~~~~~~~~~")local N...原创 2019-02-25 11:03:31 · 4185 阅读 · 0 评论 -
Lua函数传递self的深入理解
现在假设我有一个模块second.lualocal second = {}function second:funcA( ... ) self.secondNum = 5endreturn second然后再写一个模块引用second.luafirst.lualocal second = require("second")local first={}function...原创 2019-02-19 17:33:54 · 8840 阅读 · 2 评论