本文整理汇总了PHP中Builder::getLuaopenFunctionName方法的典型用法代码示例。如果您正苦于以下问题:PHP Builder::getLuaopenFunctionName方法的具体用法?PHP Builder::getLuaopenFunctionName怎么用?PHP Builder::getLuaopenFunctionName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Builder
的用法示例。
在下文中一共展示了Builder::getLuaopenFunctionName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runBuilder
function runBuilder($params)
{
$builder = new Builder($params);
if ($builder->build()) {
$contents = array();
$contents[] = '';
$contents[] = '// add to AppDelegate.cpp';
$contents[] = sprintf('#include "%s"', $builder->getOutputFilename() . '.h');
$contents[] = '';
$contents[] = '// add to AppDelegate::applicationDidFinishLaunching()';
$contents[] = 'CCLuaStack* stack = CCScriptEngineManager::sharedManager()->getScriptEngine()->getLuaStack();';
$contents[] = 'lua_State* L = stack->getLuaState();';
$contents[] = sprintf('%s(L);', $builder->getLuaopenFunctionName());
$contents[] = '';
print implode("\n", $contents);
}
}
示例2: implode
Mtolua_delete(self);
return 0;
}
EOT;
$replace = '';
$FIX[$find] = $replace;
// main
$extensions = array('crypto' => 'cocos2dx_extension_crypto_win32', 'network' => 'cocos2dx_extension_network_win32');
// main
printf("\nOUT_DIR: %s\n", OUT_DIR);
$contents = array();
$contents[] = '';
$contents[] = '// cocos2dx-extensions';
$functions = array();
foreach ($extensions as $extensionName => $luabindingFilename) {
$builder = new Builder($luabindingFilename, $FIX);
$builder->build();
$contents[] = sprintf('#include "%s"', $luabindingFilename . '.h');
$functions[] = $builder->getLuaopenFunctionName();
}
$contents[] = '';
$contents[] = '';
$contents[] = '// cocos2dx-extensions';
$contents[] = 'lua_State* L = CCScriptEngineManager::sharedManager()->getScriptEngine()->getLuaState();';
foreach ($functions as $functionName) {
$contents[] = sprintf('%s(L);', $functionName);
}
$contents[] = '';
$contents[] = '';
print "\n---------------------\n";
print implode("\n", $contents);