mirror of https://github.com/axmolengine/axmol.git
Issue #12940: Fixed a bug that is removing SimpleAudio play
This commit is contained in:
parent
fc8858523f
commit
cf70cb9c40
|
@ -1177,15 +1177,13 @@
|
||||||
*/
|
*/
|
||||||
parser.initSimpleAudio = function(json, resourcePath){
|
parser.initSimpleAudio = function(json, resourcePath){
|
||||||
|
|
||||||
|
var node = new ccs.ComAudio();
|
||||||
var loop = json["Loop"] || false;
|
var loop = json["Loop"] || false;
|
||||||
var volume = json["Volume"] || 0;
|
//var volume = json["Volume"] || 0;
|
||||||
cc.audioEngine.setMusicVolume(volume);
|
//cc.audioEngine.setMusicVolume(volume);
|
||||||
//var name = json["Name"];
|
node.setLoop(loop);
|
||||||
|
|
||||||
loadTexture(json["FileData"], resourcePath, function(path, type){
|
loadTexture(json["FileData"], resourcePath, function(path, type){
|
||||||
cc.loader.load(path, function(){
|
node.setFile(path);
|
||||||
cc.audioEngine.playMusic(path, loop);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue