Making AI able to 'see' the player

This commit is contained in:
2014-06-14 14:46:39 -07:00
parent 1bfd07ae81
commit bc135b1889

View File

@@ -646,13 +646,13 @@ var AISprite = function(game, x, y, key, frame) {
// FIXME : There has got to be a better way to do this
var rectLines = [
new Phaser.line(spr.body.left, spr.body.top,
new Phaser.Line(spr.body.left, spr.body.top,
spr.body.right, spr.body.top),
new Phaser.line(spr.body.right, spr.body.top,
new Phaser.Line(spr.body.right, spr.body.top,
spr.body.right, spr.body.bottom),
new Phaser.line(spr.body.right, spr.body.bottom,
new Phaser.Line(spr.body.right, spr.body.bottom,
spr.body.left, spr.body.bottom),
new Phaser.line(spr.body.left, spr.body.bottom,
new Phaser.Line(spr.body.left, spr.body.bottom,
spr.body.left, spr.body.top)
];
var withinView = false;