Making AI able to 'see' the player

This commit is contained in:
2014-06-14 15:42:22 -07:00
parent e4fbf8a88d
commit 7532caec33

View File

@@ -624,7 +624,9 @@ var AISprite = function(game, x, y, key, frame) {
return false;
}
return viewrect.intersectsRaw(spr.x, spr.y, spr.x + 32, spr.y + 32);
return (
viewrect.intersectsRaw(spr.x, spr.y, spr.x + 32, spr.y + 32) ||
viewrect.containsRaw(spr.x, spr.y, spr.x + 32, spr.y + 32) );
}
this.enableWordBubble = function() {