new Mouse(game)
Phaser - Mouse constructor.
Parameters:
Name | Type | Description |
---|---|---|
game |
Phaser.Game | A reference to the currently running game. |
- Source:
Members
-
<static, constant> LEFT_BUTTON :number
-
Type:
- number
- Source:
-
<static, constant> MIDDLE_BUTTON :number
-
Type:
- number
- Source:
-
<static, constant> RIGHT_BUTTON :number
-
Type:
- number
- Source:
-
callbackContext
-
- Source:
Properties:
Name Type Description callbackContext
Object Description.
-
disabled
-
You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
- Default Value:
- false
- Source:
Properties:
Name Type Description disabled
boolean -
game
-
- Source:
Properties:
Name Type Description game
Phaser.Game Local reference to game.
-
locked
-
If the mouse has been Pointer Locked successfully this will be set to true.
- Default Value:
- false
- Source:
Properties:
Name Type Description locked
boolean -
mouseDownCallback
-
- Default Value:
- null
- Source:
Properties:
Name Type Description mouseDownCallback
Description Description.
-
mouseMoveCallback
-
- Default Value:
- null
- Source:
Properties:
Name Type Description mouseMoveCallback
Description Description.
-
mouseUpCallback
-
- Default Value:
- null
- Source:
Properties:
Name Type Description mouseUpCallback
Description Description.
Methods
-
onMouseDown(event)
-
Description.
Parameters:
Name Type Description event
MouseEvent - Source:
-
onMouseMove(event)
-
Description
Parameters:
Name Type Description event
MouseEvent - Source:
-
onMouseUp(event)
-
Description.
Parameters:
Name Type Description event
MouseEvent - Source:
-
pointerLockChange(event)
-
Description.
Parameters:
Name Type Description event
MouseEvent - Source:
-
releasePointerLock()
-
Description.
- Source:
-
requestPointerLock()
-
Description.
- Source:
-
start()
-
Starts the event listeners running.
- Source:
-
stop()
-
Stop the event listeners.
- Source: