Pixel Perfect click detection now works even if the Sprite is part of a texture atlas.

This commit is contained in:
photonstorm
2013-10-25 05:40:46 +01:00
parent 1294b3a2b9
commit 2921a6de2e
11 changed files with 135 additions and 66 deletions
@@ -11,7 +11,10 @@ var b;
function create() {
Phaser.Canvas.setSmoothingEnabled(game.context, false);
b = game.add.sprite(game.world.centerX, game.world.centerY, 'mummy');
b.anchor.setTo(0.5, 0.5);
b.scale.setTo(6, 6);
b.animations.add('walk');
@@ -42,5 +45,7 @@ function outSprite() {
function render() {
game.debug.renderSpriteInputInfo(b, 32, 32);
game.debug.renderSpriteCorners(b);
game.debug.renderPoint(b.input._tempPoint);
}