========================== Type deai.plugin.lua:Proxy ========================== .. lua:module:: deai.plugin.lua.Proxy Lua proxy of a deai object When you create a deai object, a proxy object is created in lua. Some extra methods are available from these proxies. Methods ========== .. list-table:: :header-rows: 0 * - :lua:meth:`on(signal, callback) ` - Listen for signals * - :lua:meth:`once(signal, callback) ` - Listen for signals only once .. lua:method:: on(signal, callback) -> ListenHandle :rtype: :lua:mod:`ListenHandle ` :type signal: string :param signal: Listen for signals Returns a handle. The handle can be used to stop the signal listener, by calling the "stop" method. If the handle is garbage collected, the listener will be left running forever. .. lua:method:: once(signal, callback) -> ListenHandle :rtype: :lua:mod:`ListenHandle ` :type signal: string :param signal: Listen for signals only once Same as :lua:meth:`on`, except the callback will only be called for the first time the signal is received.