![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Lua
BIggyGuan
这个作者很懒,什么都没留下…
展开
-
Lua常用库,垃圾回收
print("=================自带库=================") -- string -- table print("=================时间=================") -- 系统时间 print(os.time()) -- 自定义参数 得到时间 print(os.time({year = 2021, month = 3, day = 3})) -- 返回一个table local nowTime = os.date("*t") for k, v i原创 2021-03-03 12:11:10 · 247 阅读 · 0 评论 -
Lua常用库
print("=================自带库=================") -- string -- table print("=================时间=================") -- 系统时间 print(os.time()) -- 自定义参数 得到时间 print(os.time({year = 2021, month = 3, day = 3})) -- 返回一个table local nowTime = os.date("*t") for k, v i原创 2021-03-03 11:56:41 · 407 阅读 · 0 评论 -
Lua面向对象
print("=================面向对象=================") Student = { age = 1, sex = true, Up = function () print(Student.age) print("Growing up") end, Learn = function() print("好好学习") end } Student.name = "guan" f原创 2021-03-03 00:22:46 · 107 阅读 · 0 评论 -
Lua笔记协程
fun = function() print(123) end print("**************携程的创建****************") -- (1)coroutine.create() -- (2)coroutine.wrap() co = coroutine.create( fun ) co2= coroutine.wrap( fun ) print(co2) print(type(co2)) print("**************携程的运行****************"原创 2021-03-02 16:12:56 · 86 阅读 · 0 评论 -
Lua笔记表实现class
-- 表内定义成员变量 Student = { age = 1, sex = true, Up = function () print(Student.age) print("Growing up") end, Learn = function() print("好好学习") end } --表外定义成员变量 tudent.name = "guan" function Student:Speak2()原创 2021-03-01 20:48:02 · 97 阅读 · 0 评论