owl

所属分类:3D图形编程
开发工具:Lua
文件大小:0KB
下载次数:0
上传日期:2012-05-01 19:57:40
上 传 者sh-1993
说明:  OWL是一个单模块库,它提供了一种将面向对象编程概念合并到Corona SDK项目中的简单方法。苏...,
(OWL is a single-module library that provides an easy way to incorporate object-oriented programming concepts into Corona SDK projects. Supports classes that produce display objects (as well as classes that produce non-display objects), and can even be used with non-Corona Lua scripts as well.)

文件列表:
LICENSE.md (1075, 2012-05-01)
REFERENCE.md (9441, 2012-05-01)
Samples/ (0, 2012-05-01)
Samples/ClassMethods/ (0, 2012-05-01)
Samples/ClassMethods/build.settings (895, 2012-05-01)
Samples/ClassMethods/cat.png (2431, 2012-05-01)
Samples/ClassMethods/config.lua (387, 2012-05-01)
Samples/ClassMethods/main.lua (1576, 2012-05-01)
Samples/ClassMethods/owl.lua (48, 2012-05-01)
Samples/Constructors/ (0, 2012-05-01)
Samples/Constructors/build.settings (895, 2012-05-01)
Samples/Constructors/cat.png (2431, 2012-05-01)
Samples/Constructors/config.lua (387, 2012-05-01)
Samples/Constructors/main.lua (2187, 2012-05-01)
Samples/Constructors/owl.lua (48, 2012-05-01)
Samples/EasyMetamethods/ (0, 2012-05-01)
Samples/EasyMetamethods/build.settings (895, 2012-05-01)
Samples/EasyMetamethods/config.lua (387, 2012-05-01)
Samples/EasyMetamethods/dog.png (3079, 2012-05-01)
Samples/EasyMetamethods/main.lua (1760, 2012-05-01)
Samples/EasyMetamethods/owl.lua (48, 2012-05-01)
Samples/ExternalClasses/ (0, 2012-05-01)
Samples/ExternalClasses/build.settings (895, 2012-05-01)
Samples/ExternalClasses/cat.png (2431, 2012-05-01)
Samples/ExternalClasses/class_cat.lua (114, 2012-05-01)
Samples/ExternalClasses/class_dog.lua (502, 2012-05-01)
Samples/ExternalClasses/class_kitten.lua (219, 2012-05-01)
Samples/ExternalClasses/class_puppy.lua (594, 2012-05-01)
Samples/ExternalClasses/config.lua (387, 2012-05-01)
Samples/ExternalClasses/dog.png (3079, 2012-05-01)
Samples/ExternalClasses/kitten.png (6988, 2012-05-01)
Samples/ExternalClasses/main.lua (651, 2012-05-01)
Samples/ExternalClasses/owl.lua (48, 2012-05-01)
Samples/ExternalClasses/puppy.png (4552, 2012-05-01)
Samples/PrivateClassData/ (0, 2012-05-01)
Samples/PrivateClassData/build.settings (895, 2012-05-01)
Samples/PrivateClassData/config.lua (387, 2012-05-01)
Samples/PrivateClassData/dog.png (3079, 2012-05-01)
Samples/PrivateClassData/main.lua (1943, 2012-05-01)
... ...

Objects with Lua (OWL) ====================== Easy object-oriented programming in Lua with Corona SDK. Supports display objects, and can also be used with non-Corona Lua scripts. * **Module:** owl.lua * **Version:** 1.0.1 * **License:** MIT (see below) * **Author:** Jonathan Beebe * **Website:** [http://jonbeebe.net](https://github.com/pickerel/owl/blob/master/) ### Features * Constructor/initializers via init() method of class (or custom per-instance callbacks) * Classes for display objects, as well as non-display objects. * Fast creation of new object instances from specified parent class. * Create metamethods for objects easily with property callbacks. * Familiar OOP methods: is_a(), kind_of(), instance_of() * Private class data via .private table of class. * Multi-level inheritance (to top-most parent class). ### Important Notes * Object instances have a reserved property that you cannot read or write to: **display_obj** * Object instances have four read-only properties: **class_name**, **super_class**, **raw**, and **callback_properties** * Classes and instances each have their own **private** table (*e.g. object.private*) which does not inherit any data. * [Corona SDK] Display object instances have a **raw** property that can be used to access the display object directly (no inheritance, etc.). This raw property must be used when another function takes a display object as a parameter. For example, to use group:insert(), you would do: group:insert( obj.raw ) ### Usage For examples of usage from basic to advanced, see included sample projects. And although OWL.lua can be used with non-Corona SDK Lua scripts, the samples below are Corona SDK projects that should be run in the Corona Simulator. I recommend you study all of the samples (and corresponding Terminal output), and play around with them to gain a more complete understanding of all the features of OWL. * Samples/**ExternalClasses** - shows how to separate classes into external modules. * Samples/**PrivateClassData** - demonstrates how the class and instance 'private' table works. * Samples/**ClassMethods** - shows how to define and use class methods. * Samples/**EasyMetamethods** - shows how to use property callbacks to do creative things. * Samples/**Constructors** - shows how to use class constructors and per-instance constructors. ### MIT License Copyright © 2012 Jonathan Beebe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

近期下载者

相关文件


收藏者