2014-12-31 16:28:14 +08:00
|
|
|
if nil == cc.SimpleAudioEngine then
|
|
|
|
return
|
|
|
|
end
|
2014-08-04 15:22:07 +08:00
|
|
|
--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
|
2014-10-17 14:15:30 +08:00
|
|
|
SimpleAudioEngine.sharedEngine = SimpleAudioEngineDeprecated.sharedEngine
|
2014-08-04 15:22:07 +08:00
|
|
|
|
|
|
|
function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...)
|
|
|
|
deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic")
|
|
|
|
return self:playMusic(...)
|
|
|
|
end
|
2014-10-17 14:15:30 +08:00
|
|
|
SimpleAudioEngine.playBackgroundMusic = SimpleAudioEngineDeprecated.playBackgroundMusic
|
2014-08-04 15:22:07 +08:00
|
|
|
--functions of SimpleAudioEngine will be deprecated end
|