背景和头像缺失

This commit is contained in:
2026-03-01 13:51:43 +08:00
parent eaaf7f8c9b
commit 7d2f6399af
5947 changed files with 1441367 additions and 0 deletions

View File

@@ -0,0 +1,111 @@
if nil == cc.SimpleAudioEngine then
return
end
--Encapsulate SimpleAudioEngine to AudioEngine,Play music and sound effects.
local M = {}
function M.stopAllEffects()
cc.SimpleAudioEngine:getInstance():stopAllEffects()
end
function M.getMusicVolume()
return cc.SimpleAudioEngine:getInstance():getMusicVolume()
end
function M.isMusicPlaying()
return cc.SimpleAudioEngine:getInstance():isMusicPlaying()
end
function M.getEffectsVolume()
return cc.SimpleAudioEngine:getInstance():getEffectsVolume()
end
function M.setMusicVolume(volume)
cc.SimpleAudioEngine:getInstance():setMusicVolume(volume)
end
function M.stopEffect(handle)
cc.SimpleAudioEngine:getInstance():stopEffect(handle)
end
function M.stopMusic(isReleaseData)
local releaseDataValue = false
if nil ~= isReleaseData then
releaseDataValue = isReleaseData
end
cc.SimpleAudioEngine:getInstance():stopMusic(releaseDataValue)
end
function M.playMusic(filename, isLoop)
local loopValue = false
if nil ~= isLoop then
loopValue = isLoop
end
cc.SimpleAudioEngine:getInstance():playMusic(filename, loopValue)
end
function M.pauseAllEffects()
cc.SimpleAudioEngine:getInstance():pauseAllEffects()
end
function M.preloadMusic(filename)
cc.SimpleAudioEngine:getInstance():preloadMusic(filename)
end
function M.resumeMusic()
cc.SimpleAudioEngine:getInstance():resumeMusic()
end
function M.playEffect(filename, isLoop)
local loopValue = false
if nil ~= isLoop then
loopValue = isLoop
end
return cc.SimpleAudioEngine:getInstance():playEffect(filename, loopValue)
end
function M.rewindMusic()
cc.SimpleAudioEngine:getInstance():rewindMusic()
end
function M.willPlayMusic()
return cc.SimpleAudioEngine:getInstance():willPlayMusic()
end
function M.unloadEffect(filename)
cc.SimpleAudioEngine:getInstance():unloadEffect(filename)
end
function M.preloadEffect(filename)
cc.SimpleAudioEngine:getInstance():preloadEffect(filename)
end
function M.setEffectsVolume(volume)
cc.SimpleAudioEngine:getInstance():setEffectsVolume(volume)
end
function M.pauseEffect(handle)
cc.SimpleAudioEngine:getInstance():pauseEffect(handle)
end
function M.resumeAllEffects(handle)
cc.SimpleAudioEngine:getInstance():resumeAllEffects()
end
function M.pauseMusic()
cc.SimpleAudioEngine:getInstance():pauseMusic()
end
function M.resumeEffect(handle)
cc.SimpleAudioEngine:getInstance():resumeEffect(handle)
end
function M.getInstance()
return cc.SimpleAudioEngine:getInstance()
end
function M.destroyInstance()
return cc.SimpleAudioEngine:destroyInstance()
end
AudioEngine = M

View File

@@ -0,0 +1,19 @@
if nil == cc.SimpleAudioEngine then
return
end
-- This is the DeprecatedCocosDenshionClass
DeprecatedCocosDenshionClass = {} or DeprecatedCocosDenshionClass
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--SimpleAudioEngine class will be Deprecated,begin
function DeprecatedCocosDenshionClass.SimpleAudioEngine()
deprecatedTip("SimpleAudioEngine","cc.SimpleAudioEngine")
return cc.SimpleAudioEngine
end
_G["SimpleAudioEngine"] = DeprecatedCocosDenshionClass.SimpleAudioEngine()
--SimpleAudioEngine class will be Deprecated,end

View File

@@ -0,0 +1,22 @@
if nil == cc.SimpleAudioEngine then
return
end
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--functions of SimpleAudioEngine will be deprecated begin
local SimpleAudioEngineDeprecated = { }
function SimpleAudioEngineDeprecated.sharedEngine()
deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance")
return cc.SimpleAudioEngine:getInstance()
end
SimpleAudioEngine.sharedEngine = SimpleAudioEngineDeprecated.sharedEngine
function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...)
deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic")
return self:playMusic(...)
end
SimpleAudioEngine.playBackgroundMusic = SimpleAudioEngineDeprecated.playBackgroundMusic
--functions of SimpleAudioEngine will be deprecated end