mirror of https://github.com/axmolengine/axmol.git
41 lines
1.0 KiB
Plaintext
41 lines
1.0 KiB
Plaintext
/**
|
|
* @method ${func_name}
|
|
#if $is_constructor
|
|
* @constructor
|
|
#end if
|
|
#if $min_args > 0
|
|
#set $count = 0
|
|
#for $arg in $arguments
|
|
#set $argValue = "arg" + str(count)
|
|
* @param {$generator.js_typename_from_natve($arg.namespaced_name)} $argValue
|
|
#set $count = $count + 1
|
|
#end for
|
|
#end if
|
|
#if str($ret_type) != "void"
|
|
* @return {$generator.js_typename_from_natve($ret_type.namespaced_name)}
|
|
#end if
|
|
*/
|
|
${func_name} : function (
|
|
#if $min_args > 0
|
|
#set $length = len($arguments)
|
|
#set $index = 0
|
|
#for $arg in $arguments
|
|
#set $argname = $arg.name.replace("*", "").replace("const ", "")
|
|
#if $index < $length - 1
|
|
$generator.api_param_name_from_native(argname),
|
|
#else
|
|
$generator.api_param_name_from_native(argname)
|
|
#end if
|
|
#set $index = $index + 1
|
|
#end for
|
|
#end if
|
|
)
|
|
{
|
|
#if str($ret_type) != "void"
|
|
#set $is_enum = $ret_type.is_enum
|
|
#set $ret = $ret_type.namespaced_name.replace("*", "").replace("const ", "")
|
|
return $generator.js_ret_name_from_native($ret,$is_enum);
|
|
#end if
|
|
},
|
|
|