Class: Mouse

Phaser. Mouse

The Mouse class

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

Properties:
Name Type Description
callbackContext Object

Description.

Source:

disabled

You can disable all Input by setting disabled = true. While set all new input related events will be ignored.

Properties:
Name Type Description
disabled boolean
Default Value:
  • false
Source:

game

Properties:
Name Type Description
game Phaser.Game

Local reference to game.

Source:

locked

If the mouse has been Pointer Locked successfully this will be set to true.

Properties:
Name Type Description
locked boolean
Default Value:
  • false
Source:

mouseDownCallback

Properties:
Name Type Description
mouseDownCallback Description

Description.

Default Value:
  • null
Source:

mouseMoveCallback

Properties:
Name Type Description
mouseMoveCallback Description

Description.

Default Value:
  • null
Source:

mouseUpCallback

Properties:
Name Type Description
mouseUpCallback Description

Description.

Default Value:
  • null
Source:

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:
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Documentation generated by JSDoc 3.2.0-dev on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template.