Merge pull request #6913 from samuele3hu/v3_fix

Update lua-template and lua-empty-test for replacing bgMusicPath
This commit is contained in:
minggo 2014-05-28 10:10:13 +08:00
commit 592831b8fb
3 changed files with 3 additions and 28 deletions

View File

@ -205,15 +205,7 @@ local function main()
end
-- play background music, preload effect
-- uncomment below for the BlackBerry version
local bgMusicPath = nil
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) then
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.caf")
else
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.mp3")
end
cc.SimpleAudioEngine:getInstance():playMusic(bgMusicPath, true)
cc.SimpleAudioEngine:getInstance():playMusic("res/background.mp3", true)
local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav")
cc.SimpleAudioEngine:getInstance():preloadEffect(effectPath)

View File

@ -206,15 +206,7 @@ local function main()
end
-- play background music, preload effect
-- uncomment below for the BlackBerry version
local bgMusicPath = nil
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) then
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.caf")
else
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.mp3")
end
cc.SimpleAudioEngine:getInstance():playMusic(bgMusicPath, true)
cc.SimpleAudioEngine:getInstance():playMusic("res/background.mp3", true)
local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav")
cc.SimpleAudioEngine:getInstance():preloadEffect(effectPath)

View File

@ -193,16 +193,7 @@ local function main()
end
-- play background music, preload effect
-- uncomment below for the BlackBerry version
local bgMusicPath = nil
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) then
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.caf")
else
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.mp3")
end
cc.SimpleAudioEngine:getInstance():playMusic(bgMusicPath, true)
cc.SimpleAudioEngine:getInstance():playMusic("res/background.mp3", true)
local effectPath = cc.FileUtils:getInstance():fullPathForFilename("res/effect1.wav")
cc.SimpleAudioEngine:getInstance():preloadEffect(effectPath)