mirror of
https://github.com/photonstorm/phaser
synced 2024-09-21 06:51:55 +00:00
Exposed Scale Manager via global reference
This commit is contained in:
parent
bddca4c1de
commit
953422a059
3 changed files with 14 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -22,6 +22,7 @@ var InjectionMap = {
|
|||
cache: 'cache',
|
||||
plugins: 'plugins',
|
||||
registry: 'registry',
|
||||
scale: 'scale',
|
||||
sound: 'sound',
|
||||
textures: 'textures',
|
||||
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue