當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Builder::getLuaopenFunctionName方法代碼示例

本文整理匯總了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);
    }
}
開發者ID:amorwilliams,項目名稱:Quick-Cocos2dx-Community,代碼行數:17,代碼來源:compile_luabinding_functions.php

示例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);
開發者ID:Ratel13,項目名稱:cocos2d-x-extensions-2,代碼行數:31,代碼來源:build_win32.php


注:本文中的Builder::getLuaopenFunctionName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。