SpringDragon

导航

 

模块就相当于C#中的命名空间
创建模块:
  module = {};
  module.var = "longlong";
  module.func1 = function()
    print("这个是模块里面的函数");
  end
  return module
使用模块:
  require "module";--引用模块
  module.func1();

posted on 2019-05-28 11:37  chenquanlong  阅读(108)  评论(0编辑  收藏  举报