摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Lesson6_CallListDic : MonoBehaviour { void Start() { LuaMg 阅读全文
posted @ 2020-10-28 14:35 UnitySir 阅读(374) 评论(0) 推荐(0)
摘要: using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using XLua; //无参无返回值的委托 public 阅读全文
posted @ 2020-10-28 14:33 UnitySir 阅读(457) 评论(0) 推荐(0)
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Lesson4_CallVariable : MonoBehaviour { void Start() { LuaM 阅读全文
posted @ 2020-10-28 14:31 UnitySir 阅读(202) 评论(0) 推荐(0)
摘要: using System.Collections; using System.Collections.Generic; using DSFramework; using UnityEngine; public class Lession3_LuaMgr : MonoBehaviour { void 阅读全文
posted @ 2020-10-28 14:28 UnitySir 阅读(112) 评论(0) 推荐(0)
摘要: using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; using XLua; public class Lesson2_Loader : MonoBehaviou 阅读全文
posted @ 2020-10-28 14:26 UnitySir 阅读(255) 评论(0) 推荐(0)
摘要: print("**********垃圾回收************") test = {id = 1, name = "123123"} --垃圾回收关键字 --collectgarbage --获取当前lua占用内存数 K字节 用返回值*1024 就可以得到具体的内存占用字节数 print(col 阅读全文
posted @ 2020-10-28 14:15 UnitySir 阅读(175) 评论(0) 推荐(0)
摘要: print("**********自带库************") --string --table print("**********时间************") --系统时间 print(os.time()) --自己传入参数 得到时间 print(os.time({year = 2014 阅读全文
posted @ 2020-10-28 14:14 UnitySir 阅读(138) 评论(0) 推荐(0)
摘要: --面向对象实现 --万物之父 所有对象的基类 Object --封装 Object = {} --实例化方法 function Object:new() local obj = {} --给空对象设置元表 以及 __index self.__index = self setmetatable(ob 阅读全文
posted @ 2020-10-28 14:13 UnitySir 阅读(180) 评论(0) 推荐(0)
摘要: print("**********面向对象************") print("**********封装************") --面向对象 类 其实都是基于 table来实现 --元表相关的知识点 Object = {} Object.id = 1 function Object:Te 阅读全文
posted @ 2020-10-28 14:11 UnitySir 阅读(129) 评论(0) 推荐(0)
摘要: print("**********元表************") print("**********元表概念************") --任何表变量都可以作为另一个表变量的元表 --任何表变量都可以有自己的元表(爸爸) --当我们子表中进行一些特定操作时 --会执行元表中的内容 print(" 阅读全文
posted @ 2020-10-28 14:08 UnitySir 阅读(119) 评论(0) 推荐(0)