mirror of https://github.com/axmolengine/axmol.git
Merge pull request #12809 from CocosRobot/update_lua_bindings_1436779844
[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
commit
fc41463e6e
|
@ -121,6 +121,14 @@
|
|||
-- @param #float volume
|
||||
-- @return experimental::AudioEngine#experimental::AudioEngine self (return value: cc.experimental::AudioEngine)
|
||||
|
||||
--------------------------------
|
||||
-- Preload audio file.<br>
|
||||
-- param filePath The file path of an audio.
|
||||
-- @function [parent=#AudioEngine] preload
|
||||
-- @param self
|
||||
-- @param #string filePath
|
||||
-- @return experimental::AudioEngine#experimental::AudioEngine self (return value: cc.experimental::AudioEngine)
|
||||
|
||||
--------------------------------
|
||||
-- Play 2d sound.<br>
|
||||
-- param filePath The path of an audio file.<br>
|
||||
|
|
|
@ -590,6 +590,42 @@ int lua_cocos2dx_audioengine_AudioEngine_setVolume(lua_State* tolua_S)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_audioengine_AudioEngine_preload(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:preload");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_preload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::preload(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:preload",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_preload'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -968,6 +1004,7 @@ int lua_register_cocos2dx_audioengine_AudioEngine(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"pauseAll", lua_cocos2dx_audioengine_AudioEngine_pauseAll);
|
||||
tolua_function(tolua_S,"uncacheAll", lua_cocos2dx_audioengine_AudioEngine_uncacheAll);
|
||||
tolua_function(tolua_S,"setVolume", lua_cocos2dx_audioengine_AudioEngine_setVolume);
|
||||
tolua_function(tolua_S,"preload", lua_cocos2dx_audioengine_AudioEngine_preload);
|
||||
tolua_function(tolua_S,"play2d", lua_cocos2dx_audioengine_AudioEngine_play2d);
|
||||
tolua_function(tolua_S,"getState", lua_cocos2dx_audioengine_AudioEngine_getState);
|
||||
tolua_function(tolua_S,"resume", lua_cocos2dx_audioengine_AudioEngine_resume);
|
||||
|
|
|
@ -37,6 +37,7 @@ int register_all_cocos2dx_audioengine(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_audioengine_h__
|
||||
|
|
Loading…
Reference in New Issue