how to lua extend class bound by c++ (sol2) -
i have c++ class:
struct state {}; now, use sol2 (a lua binding library) in order create derived instance state: state_sleep, state_play, etc.
i'm trying create functions: on_enter, on_exe , on_exit
for example:
state_sleep = state.new() function state_sleep:on_enter -- smt end from issue 475:
you can achieve functionality having table defers unknown operations state's metatable. can creating table , setting __newindex , __index functions appropriately.
i'm sorry, tried lot of ways understand did mean, i'm failed.
is there know did mean, or how archive functionality ?
thank you
Comments
Post a Comment