mirror of
https://github.com/wassname/phaser.git
synced 2026-07-14 01:10:16 +08:00
Adding docs.
This commit is contained in:
+63
-5
@@ -1,37 +1,92 @@
|
||||
/**
|
||||
* Phaser.MSPointer
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2013 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
* @module Phaser.MSPointer
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Phaser - MSPointer constructor.
|
||||
*
|
||||
* The MSPointer class handles touch interactions with the game and the resulting Pointer objects.
|
||||
* @class Phaser.MSPointer
|
||||
* @classdesc The MSPointer class handles touch interactions with the game and the resulting Pointer objects.
|
||||
* It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 apps using JavaScript.
|
||||
* http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
Phaser.MSPointer = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} callbackContext - Description.
|
||||
*/
|
||||
this.callbackContext = this.game;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseDownCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseDownCallback = null;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseMoveCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseMoveCallback = null;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseUpCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseUpCallback = null;
|
||||
|
||||
};
|
||||
|
||||
Phaser.MSPointer.prototype = {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
game: null,
|
||||
|
||||
/**
|
||||
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
* @type {bool}
|
||||
* @property {bool} disabled
|
||||
*/
|
||||
disabled: false,
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {Description} _onMSPointerDown
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
_onMSPointerDown: null,
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {Description} _onMSPointerMove
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
_onMSPointerMove: null,
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {Description} _onMSPointerUp
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
_onMSPointerUp: null,
|
||||
|
||||
/**
|
||||
* Starts the event listeners running
|
||||
* Starts the event listeners running.
|
||||
* @method start
|
||||
*/
|
||||
start: function () {
|
||||
@@ -64,6 +119,7 @@ Phaser.MSPointer.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method onPointerDown
|
||||
* @param {Any} event
|
||||
**/
|
||||
@@ -82,6 +138,7 @@ Phaser.MSPointer.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method onPointerMove
|
||||
* @param {Any} event
|
||||
**/
|
||||
@@ -100,6 +157,7 @@ Phaser.MSPointer.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method onPointerUp
|
||||
* @param {Any} event
|
||||
**/
|
||||
@@ -118,7 +176,7 @@ Phaser.MSPointer.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop the event listeners
|
||||
* Stop the event listeners.
|
||||
* @method stop
|
||||
*/
|
||||
stop: function () {
|
||||
|
||||
Reference in New Issue
Block a user