Added onPointerLockChange handler.

This commit is contained in:
Richard Davey 2019-07-08 13:29:50 +01:00
parent 254f3843e5
commit af37728e31

View file

@ -771,6 +771,25 @@ var InputManager = new Class({
this.updateInputPlugins(CONST.MOUSE_WHEEL, this.mousePointerContainer);
},
/**
* Processes a pointer lock change event, as passed in by the MouseManager.
*
* @method Phaser.Input.InputManager#onPointerLockChange
* @fires Phaser.Input.Events#POINTERLOCK_CHANGE
* @private
* @since 3.19.0
*
* @param {MouseEvent} event - The native DOM Mouse event.
*/
onPointerLockChange: function (event)
{
var isLocked = this.mouse.locked;
this.mousePointer.locked = isLocked;
this.events.emit(Events.POINTERLOCK_CHANGE, event, isLocked);
},
/**
* Checks if the given Game Object should be considered as a candidate for input or not.
*