local Hi = {} function Hi.Destroy() ---- end
or also
local Hi = {} function Hi:ChangeValueToInfinite() ---- end
doing:
local car = { start = function() print("starting car") end, move = function() print("moving at 20 MPH") end }
is equivalent to doing:
local car = {} function car.start() print("starting car") end function car.move() print("moving at 20 MPH") end
so basically doing that is another way of defining a method of an object (or as you might call it a table in Lua)..
you can do object.X = Y;
where X is a property name, and Y is the value of the property, but if you really think about it, there isn't the same syntax for methods without using function object.methodName()
.. which would only limit you to do:
object = {methodName = f()}
or
object.methodName = f()