Merge pull request #3937 from goldfire/goldfire-patch-1

Use correct frame name in pixel perfect hit test
This commit is contained in:
Richard Davey 2018-08-18 16:03:07 +01:00 committed by GitHub
commit 7918f0991d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ var CreatePixelPerfectHandler = function (textureManager, alphaTolerance)
{
return function (hitArea, x, y, gameObject)
{
var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.key);
var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name);
return (alpha && alpha >= alphaTolerance);
};