Lua: Basic OO
From Mario Fan Games Galaxy Wiki
Lua |
---|
Basics |
Intermediate |
Advanced |
|
XLua |
Add to this template |
Though Lua has no true class support, it is still possible to emulate object-oriented programming through various methods, usually metatables. However, metatables are not required to produce a basic implementation of OO. This program will function with the regular Lua executable, but the effects will be much easier to see with another host program like SDL or MMF2.
objects = { newID = 0, o = { }, }