mirror of
https://github.com/wassname/phaser.git
synced 2026-08-08 11:23:41 +08:00
Working on Linked List node swapping.
This commit is contained in:
+4
-4
@@ -13,9 +13,9 @@ Phaser.Input = function (game) {
|
||||
|
||||
};
|
||||
|
||||
Phaser.Mouse_OVERRIDES_TOUCH = 0;
|
||||
Phaser.Touch_OVERRIDES_MOUSE = 1;
|
||||
Phaser.Mouse_TOUCH_COMBINE = 2;
|
||||
Phaser.Input.MOUSE_OVERRIDES_TOUCH = 0;
|
||||
Phaser.Input.TOUCH_OVERRIDES_MOUSE = 1;
|
||||
Phaser.Input.MOUSE_TOUCH_COMBINE = 2;
|
||||
|
||||
Phaser.Input.prototype = {
|
||||
|
||||
@@ -60,7 +60,7 @@ Phaser.Input.prototype = {
|
||||
/**
|
||||
* Controls the expected behaviour when using a mouse and touch together on a multi-input device
|
||||
*/
|
||||
multiInputOverride: Phaser.Mouse_TOUCH_COMBINE,
|
||||
multiInputOverride: Phaser.Input.MOUSE_TOUCH_COMBINE,
|
||||
|
||||
/**
|
||||
* A vector object representing the current position of the Pointer.
|
||||
|
||||
@@ -238,7 +238,7 @@ Phaser.Pointer.prototype = {
|
||||
// x and y are the old values here?
|
||||
this.positionDown.setTo(this.x, this.y);
|
||||
|
||||
if (this.game.input.multiInputOverride == Phaser.Mouse_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Mouse_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Touch_OVERRIDES_MOUSE && this.game.input.currentPointers == 0))
|
||||
if (this.game.input.multiInputOverride == Phaser.Input.MOUSE_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Input.MOUSE_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Input.TOUCH_OVERRIDES_MOUSE && this.game.input.currentPointers == 0))
|
||||
{
|
||||
//this.game.input.x = this.x * this.game.input.scale.x;
|
||||
//this.game.input.y = this.y * this.game.input.scale.y;
|
||||
@@ -272,7 +272,7 @@ Phaser.Pointer.prototype = {
|
||||
{
|
||||
if (this._holdSent == false && this.duration >= this.game.input.holdRate)
|
||||
{
|
||||
if (this.game.input.multiInputOverride == Phaser.Mouse_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Mouse_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Touch_OVERRIDES_MOUSE && this.game.input.currentPointers == 0))
|
||||
if (this.game.input.multiInputOverride == Phaser.Input.MOUSE_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Input.MOUSE_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Input.TOUCH_OVERRIDES_MOUSE && this.game.input.currentPointers == 0))
|
||||
{
|
||||
this.game.input.onHold.dispatch(this);
|
||||
}
|
||||
@@ -295,9 +295,6 @@ Phaser.Pointer.prototype = {
|
||||
this._history.shift();
|
||||
}
|
||||
}
|
||||
|
||||
// Check which camera they are over
|
||||
// this.camera = this.game.world.cameras.getCameraUnderPoint(this.x, this.y);
|
||||
}
|
||||
|
||||
},
|
||||
@@ -335,7 +332,7 @@ Phaser.Pointer.prototype = {
|
||||
this.circle.x = this.x;
|
||||
this.circle.y = this.y;
|
||||
|
||||
if (this.game.input.multiInputOverride == Phaser.Mouse_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Mouse_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Touch_OVERRIDES_MOUSE && this.game.input.currentPointers == 0))
|
||||
if (this.game.input.multiInputOverride == Phaser.Input.MOUSE_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Input.MOUSE_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Input.TOUCH_OVERRIDES_MOUSE && this.game.input.currentPointers == 0))
|
||||
{
|
||||
this.game.input.activePointer = this;
|
||||
this.game.input.x = this.x;
|
||||
@@ -453,7 +450,7 @@ Phaser.Pointer.prototype = {
|
||||
|
||||
this.timeUp = this.game.time.now;
|
||||
|
||||
if (this.game.input.multiInputOverride == Phaser.Mouse_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Mouse_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Touch_OVERRIDES_MOUSE && this.game.input.currentPointers == 0))
|
||||
if (this.game.input.multiInputOverride == Phaser.Input.MOUSE_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Input.MOUSE_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Input.TOUCH_OVERRIDES_MOUSE && this.game.input.currentPointers == 0))
|
||||
{
|
||||
this.game.input.onUp.dispatch(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user