Lunarovich Posted March 19, 2015 Share Posted March 19, 2015 Hello, can anyone give me a hint or a link that explains how to create Lua classes similar to those built into Leadwerks? For example, Leadwerks has a Model class, and you can do a Model:Create() in order to create a new model. I would like to have my custom classes, eg. Block, with a method Block:Create(). I know that Lua classes are, in fact, made in C++ and disposed via Lua interface. I have a Leadwerks standard edition, but would prefer not to fiddle at this point with C++ (which I've, BTW, learned, so I can use it). But if it's necessary, I would gladly ask for some hint/advice where to start. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Rick Posted March 19, 2015 Share Posted March 19, 2015 Look at the AnimationManager.lua file that comes with all projects. It gives an idea of how you can "simulate" classes in Lua. Quote Link to comment Share on other sites More sharing options...
shadmar Posted March 19, 2015 Share Posted March 19, 2015 http://www.leadwerks.com/werkspace/topic/7695-really-simple-lua-oop-exercise http://www.leadwerks.com/werkspace/topic/6452-lua-classes-and-inheritance 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Lunarovich Posted March 19, 2015 Author Share Posted March 19, 2015 Thank you guys! Quote Link to comment Share on other sites More sharing options...
ghost811 Posted March 22, 2015 Share Posted March 22, 2015 Try this one from wow, it's not Leadwerks specific, but it has simple, clear and easy to read descriptions. http://www.wowwiki.com/Object-oriented_programming Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.