Exposed Scale Manager via global reference

This commit is contained in:
Richard Davey 2018-10-09 18:14:09 +01:00
parent bddca4c1de
commit 953422a059
3 changed files with 14 additions and 2 deletions

View file

@ -231,11 +231,11 @@ var Game = new Class({
*
* The Scale Manager is a global system responsible for handling game scaling events.
*
* @name Phaser.Game#scaleManager
* @name Phaser.Game#scale
* @type {Phaser.Boot.ScaleManager}
* @since 3.15.0
*/
this.scaleManager = new ScaleManager(this, this.config);
this.scale = new ScaleManager(this, this.config);
/**
* An instance of the base Sound Manager.

View file

@ -22,6 +22,7 @@ var InjectionMap = {
cache: 'cache',
plugins: 'plugins',
registry: 'registry',
scale: 'scale',
sound: 'sound',
textures: 'textures',

View file

@ -148,6 +148,17 @@ var Systems = new Class({
*/
this.registry;
/**
* A reference to the global Scale Manager.
*
* In the default set-up you can access this from within a Scene via the `this.scale` property.
*
* @name Phaser.Scenes.Systems#scale
* @type {Phaser.DOM.ScaleManager}
* @since 3.15.0
*/
this.scale;
/**
* A reference to the global Sound Manager.
*