From b31b7b310c88434c6679dc9694be938fb4c8eabd Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sat, 14 Jun 2014 15:22:39 -0700 Subject: [PATCH] Making AI able to 'see' the player --- moonlight/js/moonlight-skulk.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 2bb4b44..a4a2cfa 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -614,6 +614,9 @@ var AISprite = function(game, x, y, key, frame) { var p3 = new Phaser.Point(viewline.end.x, viewline.end.y); var p4 = new Phaser.Point(viewline.end.x, viewline.end.y); p4.rotate(p1.x, p1.y, 45, true); + + if (debug == true ) + console.log([p1, p2, p3, p4]); /* * ... In case this isn't obvious, this is the sprite's view cone: