development/Common/Utility/source/Script/lb_input.cpp
// Helper function that scripts can use to subscribe to event handlers
Helper function that scripts can use to subscribe to event handlers
Helper function that scripts can use to subscribe to event handlers
void connect(const std::string& name, const luabind::object &callback)
    {
        luabind::object g = luabind::globals(callback.interpreter());
        luabind::object lua_yaget = luabind::gettable(g, "yaget");
        InputManager *input = luabind::object_cast<InputManager *>(lua_yaget["input"]);
        InputManager::ActionListener_t action = input->ListenForAction(name, LuaInputCallbackFunctor(callback));
    }
void connect ( const std :: string & name , const luabind :: object & callback ) { luabind :: object g = luabind :: globals ( callback . interpreter ( ) ) ; luabind :: object lua_yaget = luabind :: gettable ( g , " " ) ; InputManager * input = luabind :: object_cast < InputManager * > ( lua_yaget [ " " ] ) ; InputManager :: ActionListener_t action = input -> ListenForAction ( name , LuaInputCallbackFunctor ( callback ) ) ; }
Helper function that scripts can use to subscribe to event handlers
Helper function that scripts can use to subscribe to event handlers