review code

This commit is contained in:
VisualSJ
2017-01-16 17:30:03 +08:00
parent 59c787ba0a
commit b2ef365eec
2 changed files with 1 additions and 6 deletions
-1
View File
@@ -381,7 +381,6 @@ var WebAudioElement = function (buffer, audio) {
this._currentSource.onended = null;
this.pause();
this.play();
this._currentSource.onended = this._endCallback;
}
return num;
});
+1 -5
View File
@@ -114,11 +114,7 @@ var AudioSource = cc.Class({
return this._volume;
},
set: function (value) {
if (value < 0) {
value = 0;
} else if (value > 1) {
value = 1;
}
value = cc.clamp01(value);
this._volume = value;
var audio = this.audio;
if (audio && !this._mute) {