File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11var CHECKSUM = {
2- build : '98dca120-6d40 -11e7-8ba2-2f8841c28191 '
2+ build : '668ff4c0-6d49 -11e7-a9ff-d120a05f4baf '
33} ;
44module . exports = CHECKSUM ;
Original file line number Diff line number Diff line change 1+ var INPUT_CONST = {
2+
3+ ALL : 0 ,
4+ TOP : 1
5+
6+ } ;
7+
8+ module . exports = INPUT_CONST ;
Original file line number Diff line number Diff line change @@ -7,16 +7,20 @@ var PointerDownEvent = new Class({
77
88 initialize :
99
10- function PointerDownEvent ( pointer , gameObject )
10+ function PointerDownEvent ( pointer , topObject , gameObjects )
1111 {
1212 Event . call ( this , 'POINTER_DOWN_EVENT' ) ;
1313
1414 this . pointer = pointer ;
15- this . gameObject = gameObject ;
16- this . input = gameObject . input ;
1715
18- this . x = gameObject . input . localX ;
19- this . y = gameObject . input . localY ;
16+ this . x = pointer . x ;
17+ this . y = pointer . y ;
18+
19+ // An array of all the game objects the pointer event occurred on
20+ this . gameObjects = gameObjects ;
21+
22+ // A reference to the top-most game object in the list (based on display list order)
23+ this . top = topObject ;
2024 }
2125
2226} ) ;
Original file line number Diff line number Diff line change @@ -7,16 +7,20 @@ var PointerOutEvent = new Class({
77
88 initialize :
99
10- function PointerOutEvent ( pointer , gameObject )
10+ function PointerOutEvent ( pointer , topObject , gameObjects )
1111 {
1212 Event . call ( this , 'POINTER_OUT_EVENT' ) ;
1313
1414 this . pointer = pointer ;
15- this . gameObject = gameObject ;
16- this . input = gameObject . input ;
1715
18- this . x = gameObject . input . localX ;
19- this . y = gameObject . input . localY ;
16+ this . x = pointer . x ;
17+ this . y = pointer . y ;
18+
19+ // An array of all the game objects the pointer event occurred on
20+ this . gameObjects = gameObjects ;
21+
22+ // A reference to the top-most game object in the list (based on display list order)
23+ this . top = topObject ;
2024 }
2125
2226} ) ;
Original file line number Diff line number Diff line change @@ -7,16 +7,20 @@ var PointerOverEvent = new Class({
77
88 initialize :
99
10- function PointerOverEvent ( pointer , gameObject )
10+ function PointerOverEvent ( pointer , topObject , gameObjects )
1111 {
1212 Event . call ( this , 'POINTER_OVER_EVENT' ) ;
1313
1414 this . pointer = pointer ;
15- this . gameObject = gameObject ;
16- this . input = gameObject . input ;
1715
18- this . x = gameObject . input . localX ;
19- this . y = gameObject . input . localY ;
16+ this . x = pointer . x ;
17+ this . y = pointer . y ;
18+
19+ // An array of all the game objects the pointer event occurred on
20+ this . gameObjects = gameObjects ;
21+
22+ // A reference to the top-most game object in the list (based on display list order)
23+ this . top = topObject ;
2024 }
2125
2226} ) ;
Original file line number Diff line number Diff line change @@ -7,16 +7,20 @@ var PointerUpEvent = new Class({
77
88 initialize :
99
10- function PointerUpEvent ( pointer , gameObject )
10+ function PointerUpEvent ( pointer , topObject , gameObjects )
1111 {
1212 Event . call ( this , 'POINTER_UP_EVENT' ) ;
1313
1414 this . pointer = pointer ;
15- this . gameObject = gameObject ;
16- this . input = gameObject . input ;
1715
18- this . x = gameObject . input . localX ;
19- this . y = gameObject . input . localY ;
16+ this . x = pointer . x ;
17+ this . y = pointer . y ;
18+
19+ // An array of all the game objects the pointer event occurred on
20+ this . gameObjects = gameObjects ;
21+
22+ // A reference to the top-most game object in the list (based on display list order)
23+ this . top = topObject ;
2024 }
2125
2226} ) ;
Original file line number Diff line number Diff line change 22
33module . exports = {
44
5+ // CONSTs (makes them visible under Phaser.Input)
6+ RETURN_ALL : 0 ,
7+ RETURN_TOP : 1 ,
8+
59 Keyboard : require ( './keyboard' ) ,
610 Mouse : require ( './mouse' )
711
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ var DisplayList = new Class({
9494 return gameObjects . sort ( this . sortIndexHandler . bind ( this ) ) ;
9595 } ,
9696
97+ // Note that the given array is sorted in place, even though it isn't returned directly it will still be updated.
9798 getTopGameObject : function ( gameObjects )
9899 {
99100 this . sortGameObjects ( gameObjects ) ;
You can’t perform that action at this time.
0 commit comments