Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,10 +844,10 @@ Phaser.Input.prototype = {
{
return (displayObject.hitArea.contains(this._localPoint.x, this._localPoint.y));
}
else if (displayObject instanceof PIXI.Sprite)
else if (displayObject instanceof Phaser.TileSprite)
{
var width = displayObject.texture.frame.width;
var height = displayObject.texture.frame.height;
var width = displayObject.width;
var height = displayObject.height;
var x1 = -width * displayObject.anchor.x;

if (this._localPoint.x >= x1 && this._localPoint.x < x1 + width)
Expand All @@ -860,10 +860,10 @@ Phaser.Input.prototype = {
}
}
}
else if (displayObject instanceof Phaser.TileSprite)
else if (displayObject instanceof PIXI.Sprite)
{
var width = displayObject.width;
var height = displayObject.height;
var width = displayObject.texture.frame.width;
var height = displayObject.texture.frame.height;
var x1 = -width * displayObject.anchor.x;

if (this._localPoint.x >= x1 && this._localPoint.x < x1 + width)
Expand Down