mirror of
https://github.com/wassname/phaser.git
synced 2026-07-07 00:06:37 +08:00
ArcadePhysics.updateMotion applies the dt to the velocity calculations as well as position now (thanks jcs)
This commit is contained in:
@@ -534,12 +534,13 @@ Phaser.InputHandler.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method Phaser.InputHandler#checkPixel
|
||||
* @param {Description} x - Description.
|
||||
* @param {Description} y - Description.
|
||||
* @return {boolean}
|
||||
*/
|
||||
* Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to.
|
||||
* It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.
|
||||
* @method Phaser.InputHandler#checkPixel
|
||||
* @param {number} x - The x coordinate to check.
|
||||
* @param {number} y - The y coordinate to check.
|
||||
* @return {boolean} true if there is the alpha of the pixel is >= InputHandler.pixelPerfectAlpha
|
||||
*/
|
||||
checkPixel: function (x, y) {
|
||||
|
||||
// Grab a pixel from our image into the hitCanvas and then test it
|
||||
@@ -547,8 +548,6 @@ Phaser.InputHandler.prototype = {
|
||||
{
|
||||
this.game.input.hitContext.clearRect(0, 0, 1, 1);
|
||||
|
||||
// This will fail if the image is part of a texture atlas - need to modify the x/y values here
|
||||
|
||||
x += this.sprite.texture.frame.x;
|
||||
y += this.sprite.texture.frame.y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user