⭐interface
Interface Helper Library, loaded by requiring "gamesense/interface"
Last updated
Interface Helper Library, loaded by requiring "gamesense/interface"
Last updated
interface(module_name: string, interface_name: string)
: cdata (interface object pointer)
Creates an interface and returns an interface object pointer pointing to it
interface(ptr: cdata / userdata)
: cdata (interface object pointer)
Converts the given pointer to an interface object pointer and returns it
In order to bind functions to an interface object, you have to index it with any desirable name and set it to a table that contains 2 or more elements. The first being either an index or a pattern of the needed function, and the other ones being the type definition.
Argument
Type
Description
module_name
string
Filename of the module that contains the interface
interface_name
string
Name of the interface
Argument
Type
Description
ptr
cdata / userdata
Pointer to an interface