🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Making LUA more OO-like

Started by
0 comments, last by Prozak 20 years, 5 months ago
Hi all, can i make lua code more OO-like, so that: kitchen_fork(USE_ON_FOOD); ...i can do: kitche.fork(USE_ON_FOOD); ? I''m using LUA 5.0 under VS C++ .Net... Thanks for any tips on this... Jester Says: Visit Positronic Dreams! [Hugo Ferreira][Positronic Dreams][Colibri 3D Engine][Entropy HL2 MOD]
[Yann L.][Enginuity] [Penny Arcade] [MSDN][VS RoadMap][Humus][BSPs][UGP][NeHe]
"I say we take off and nuke the entire site from orbit. It''s the only way to be sure."
Advertisement
A good start point

btw: LUA tables can be referenced by name, creating psuedo-classes. eg: kitchen["fork"] is accessible via kitchen.fork (the latter is syntaxical sugar)

[edited by - downgraded on February 5, 2004 11:37:54 PM]

This topic is closed to new replies.

Advertisement