mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 01:17:43 +00:00
Added onPointerLockChange handler.
This commit is contained in:
parent
254f3843e5
commit
af37728e31
1 changed files with 19 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue