forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputHandler.js
More file actions
69 lines (54 loc) · 1.52 KB
/
Copy pathInputHandler.js
File metadata and controls
69 lines (54 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Phaser.InputHandler = function (sprite) {
this.game = sprite.game;
this.sprite = sprite;
this.enabled = false;
// Linked list references
this.last = this;
this.first = this;
/**
* The PriorityID controls which Sprite receives an Input event first if they should overlap.
*/
this.priorityID = 0;
this.isDragged = false;
this.dragPixelPerfect = false;
this.allowHorizontalDrag = true;
this.allowVerticalDrag = true;
this.bringToTop = false;
this.snapOnDrag = false;
this.snapOnRelease = false;
this.snapX = 0;
this.snapY = 0;
/**
* Is this sprite allowed to be dragged by the mouse? true = yes, false = no
* @default false
*/
this.draggable = false;
/**
* A region of the game world within which the sprite is restricted during drag
* @default null
*/
this.boundsRect = null;
/**
* An Sprite the bounds of which this sprite is restricted during drag
* @default null
*/
this.boundsSprite = null;
/**
* If this object is set to consume the pointer event then it will stop all propogation from this object on.
* For example if you had a stack of 6 sprites with the same priority IDs and one consumed the event, none of the others would receive it.
* @type {bool}
*/
this.consumePointerEvent = false;
};
Phaser.InputHandler.prototype = {
game: null,
sprite: null,
// Linked list references
parent: null,
_iNext: null,
_iPrev: null,
first: null,
last: null,
enable: function () {
},
};