lua-oop

所属分类:collect
开发工具:Lua
文件大小:0KB
下载次数:0
上传日期:2016-03-20 15:29:33
上 传 者sh-1993
说明:  Lua面向对象编程框架。哇!,
(Lua Object Oriented Programming Framework. WOW!,)

文件列表:
examples/ (0, 2016-03-20)
examples/GlobalConfig.lua (178, 2016-03-20)
examples/logic/ (0, 2016-03-20)
examples/logic/BaseModel.lua (104, 2016-03-20)
examples/logic/EventDispatcher.lua (235, 2016-03-20)
examples/logic/rank/ (0, 2016-03-20)
examples/logic/rank/RankModel.lua (104, 2016-03-20)
examples/logic/shop/ (0, 2016-03-20)
examples/logic/shop/ShopModel.lua (128, 2016-03-20)
examples/main.lua (454, 2016-03-20)
oop/ (0, 2016-03-20)
oop/Object.lua (4138, 2016-03-20)
oop/class.lua (337, 2016-03-20)
oop/include.lua (77, 2016-03-20)
oop/package.lua (1663, 2016-03-20)

# lua-oop framework. 1. multi inheritance. 2. easy to use. 3. used in productions for a long time. # Usage: ## Common -- the main file: ``` oop = require 'oop.include' ``` ## A class -- a class file Play.lua: ``` local Play = oop.class() function Play:init() end function Play:func() end return Play ``` -- another file using class Play: ``` local play = Play:new() -- no need to require Play.lua ``` ## Usage of oop.pacakge -- directory can be used as package. -- the main file: ``` oop.package('logic') ``` -- a file under dir logic, logic/Energy.lua: ``` local Energy = oop.class() return Energy ``` -- another file using Energy ``` local energy = logic.Energy:new() ``` # Examples Test examples in command line: ``` cd examples && lua main.lua ```

近期下载者

相关文件


收藏者