You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Operator Overloading LuaMetamethods in LuaObjects #104
I would love the ability to make a LuaObject class that can handle operators differently based on the type being passed in.
An example being a Vector class that you can choose to multiply by either another Vector, or a double scalar:
But understandably right now it complains about there already being a 'Mul' metamethod declared.
I can work around the issue by declaring a single metamethod that accepts LuaValues as parameters, but that requires manually checking the type of each argument which is pretty tedious (especially when there's other similar overloads for other operators).
Activity