本文整理匯總了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);