From a47019b415456f632abb96959543229e80abbb91 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 24 Apr 2019 12:54:48 +0100 Subject: [PATCH] Keep the property but set to `null` by default. --- src/core/Game.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/core/Game.js b/src/core/Game.js index a9a16109f..a887096e0 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -240,17 +240,21 @@ var Game = new Class({ */ this.scale = new ScaleManager(this, this.config); + /** + * An instance of the base Sound Manager. + * + * The Sound Manager is a global system responsible for the playback and updating of all audio in your game. + * + * You can disable the inclusion of the Sound Manager in your build by toggling the webpack `FEATURE_SOUND` flag. + * + * @name Phaser.Game#sound + * @type {Phaser.Sound.BaseSoundManager} + * @since 3.0.0 + */ + this.sound = null; + if (typeof FEATURE_SOUND) { - /** - * An instance of the base Sound Manager. - * - * The Sound Manager is a global system responsible for the playback and updating of all audio in your game. - * - * @name Phaser.Game#sound - * @type {Phaser.Sound.BaseSoundManager} - * @since 3.0.0 - */ this.sound = SoundManagerCreator.create(this); }