I want to make it so I can create a Lua object that inherits all of the values associated with that C++ object. I made it so I pass the object to another class but it can't use the syntactical sugar of ":", making it feel very unnatural:
// C++
luabind::call_member<void>( m_LuaSelf, "Setup" );
-- Lua
function TheC++Class:Setup()
......... -- gets the other lua class name, which I'll class "MyTestClass"
_G[ self.luaClassName ][ 'Setup' ]( self )
end
function MyTestClass:Setup()
-- it reaches this point
-- how can functions in this class be called using the ':' (colon) instead '.' (period) e.g.
--self:bar() instead of
--MyTestNPC.Setup( self ) -- the only way I've found
end
I understand this is a complicated post so all input is appreciated.