Skip to content

Commit e281b25

Browse files
committed
remove hitTest override
1 parent 0bedbae commit e281b25

File tree

2 files changed

+0
-47
lines changed

2 files changed

+0
-47
lines changed

src/Scene.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ var Scene = function () {
99
window.addEventListener('DOMMouseScroll', this.scroll, false);
1010
window.onmousewheel = this.scroll.bind(this);
1111
}
12-
//inject multi hitTest.
13-
Phaser.Input.InputPlugin.prototype.hitTestPointer = Pointer.prototype.hitTestPointer;
1412
}
1513

1614
Scene.prototype = {

src/UI/Pointer.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -149,49 +149,4 @@ Pointer.prototype.update = function () {
149149

150150
}
151151

152-
Pointer.prototype.hitTestPointer = function (pointer)
153-
{
154-
var camera = this.cameras.getCameraBelowPointer(pointer);
155-
156-
if (camera)
157-
{
158-
var over = [];
159-
160-
// Do A hitTest for each camera
161-
for (var i = this.cameras.cameras.length - 1; i >= 0; i--)
162-
{
163-
var c = this.cameras.cameras[i];
164-
pointer.camera = c;
165-
166-
// Get a list of all objects that can be seen by the camera below the pointer in the scene and store in 'output' array.
167-
// All objects in this array are input enabled, as checked by the hitTest method, so we don't need to check later on as well.
168-
over = this.manager.hitTest(pointer.x, pointer.y, this._list, c);
169-
170-
if(over.length > 0)
171-
{
172-
173-
// Filter out the drop zones
174-
for (var s = 0; s < over.length; s++)
175-
{
176-
var obj = over[s];
177-
178-
if (obj.input.dropZone)
179-
{
180-
this._tempZones.push(obj);
181-
}
182-
}
183-
184-
return over;
185-
}
186-
187-
}
188-
189-
return over;
190-
}
191-
else
192-
{
193-
return [];
194-
}
195-
},
196-
197152
module.exports = Pointer;

0 commit comments

Comments
 (0)