Completed a TODO by setting BaseSound update method to NOOP

This commit is contained in:
Pavle Goloskokovic 2017-11-23 13:19:22 +01:00
parent a2ceff63f1
commit 5f55931d22

View file

@ -1,6 +1,7 @@
var Class = require('../utils/Class'); var Class = require('../utils/Class');
var Extend = require('../utils/object/Extend'); var Extend = require('../utils/object/Extend');
var EventDispatcher = require('../events/EventDispatcher'); var EventDispatcher = require('../events/EventDispatcher');
var NOOP = require('../utils/NOOP');
// Phaser.Sound.BaseSound // Phaser.Sound.BaseSound
var BaseSound = new Class({ var BaseSound = new Class({
initialize: function BaseSound(manager, key, config) { initialize: function BaseSound(manager, key, config) {
@ -136,7 +137,6 @@ var BaseSound = new Class({
*/ */
this.events = new EventDispatcher(); this.events = new EventDispatcher();
}, },
// TODO set default methods to NOOP if not used
addMarker: function (marker) { addMarker: function (marker) {
if (!marker) { if (!marker) {
console.error('addMarker - Marker object has to be provided!'); console.error('addMarker - Marker object has to be provided!');
@ -254,8 +254,7 @@ var BaseSound = new Class({
fadeTo: function (volume, duration) { fadeTo: function (volume, duration) {
return null; return null;
}, },
update: function () { update: NOOP,
},
destroy: function () { destroy: function () {
} }
}); });