зеркало из https://github.com/microsoft/cocos2d-x.git
Update lua-template and lua-empty-test for replacing bgMusicPath
This commit is contained in:
Родитель
c52132179a
Коммит
90cac02de6
|
@ -205,7 +205,8 @@ local function main()
|
|||
end
|
||||
|
||||
-- play background music, preload effect
|
||||
cc.SimpleAudioEngine:getInstance():playMusic("res/background.mp3", true)
|
||||
local bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("background.mp3")
|
||||
cc.SimpleAudioEngine:getInstance():playMusic(bgMusicPath, true)
|
||||
local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav")
|
||||
cc.SimpleAudioEngine:getInstance():preloadEffect(effectPath)
|
||||
|
||||
|
|
|
@ -206,7 +206,10 @@ local function main()
|
|||
end
|
||||
|
||||
-- play background music, preload effect
|
||||
cc.SimpleAudioEngine:getInstance():playMusic("res/background.mp3", true)
|
||||
|
||||
-- uncomment below for the BlackBerry version
|
||||
local bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("background.mp3")
|
||||
cc.SimpleAudioEngine:getInstance():playMusic(bgMusicPath, true)
|
||||
local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav")
|
||||
cc.SimpleAudioEngine:getInstance():preloadEffect(effectPath)
|
||||
|
||||
|
|
|
@ -193,7 +193,8 @@ local function main()
|
|||
end
|
||||
|
||||
-- play background music, preload effect
|
||||
cc.SimpleAudioEngine:getInstance():playMusic("res/background.mp3", true)
|
||||
local bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.mp3")
|
||||
cc.SimpleAudioEngine:getInstance():playMusic(bgMusicPath, true)
|
||||
local effectPath = cc.FileUtils:getInstance():fullPathForFilename("res/effect1.wav")
|
||||
cc.SimpleAudioEngine:getInstance():preloadEffect(effectPath)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче