fix experimental namespace

This commit is contained in:
coulsonwang 2019-10-29 14:19:16 +08:00
parent 84feb1f87c
commit d77cd8f3b1
4 changed files with 8 additions and 8 deletions

View File

@ -172,14 +172,14 @@ local function main()
local function menuCallbackClosePopup()
-- stop test sound effect
ccexp.AudioEngine:stop(effectID)
cc.AudioEngine:stop(effectID)
menuPopup:setVisible(false)
end
local function menuCallbackOpenPopup()
-- loop test sound effect
local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav")
effectID = ccexp.AudioEngine:play2d(effectPath)
effectID = cc.AudioEngine:play2d(effectPath)
menuPopup:setVisible(true)
end
@ -207,9 +207,9 @@ local function main()
-- play background music, preload effect
local bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("background.mp3")
ccexp.AudioEngine:play2d(bgMusicPath, true)
cc.AudioEngine:play2d(bgMusicPath, true)
local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav")
ccexp.AudioEngine:preload(effectPath)
cc.AudioEngine:preload(effectPath)
-- run
local sceneGame = cc.Scene:create()

View File

@ -22,7 +22,7 @@ local function ComponentTestLayer()
layer:addChild(player);
local function onEvent(event)
ccexp.AudioEngine:stopAll()
cc.AudioEngine:stopAll()
local scene = cc.Scene:create()
scene:addChild(ComponentTestLayer())
@ -32,7 +32,7 @@ local function ComponentTestLayer()
local function onNodeEvent(event)
if "exit" == event then
ccexp.AudioEngine:stopAll()
cc.AudioEngine:stopAll()
end
end

View File

@ -40,7 +40,7 @@ local player = {
local function onTouchesEnded(touches, event)
local location = touches[1]:getLocation()
self:generateProjectile(location.x, location.y)
ccexp.AudioEngine:play2d("pew-pew-lei.wav")
cc.AudioEngine:play2d("pew-pew-lei.wav")
end
local listener = cc.EventListenerTouchAllAtOnce:create()

View File

@ -10,7 +10,7 @@ local scene = {
enemies = {},
onEnter = function(self)
ccexp.AudioEngine:play2d("background-music-aac.mp3", true)
cc.AudioEngine:play2d("background-music-aac.mp3", true)
end,
update = function(self, dt)