From 102366e3acde07bfc29897202842b70247142336 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sat, 14 Jun 2014 14:51:45 -0700 Subject: [PATCH] Making AI able to 'see' the player --- moonlight/js/moonlight-skulk.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 3c906de..2175621 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -625,20 +625,20 @@ var AISprite = function(game, x, y, key, frame) { */ if ( hasState(this, STATE_FACE_LEFT) ) { - rotateAllpoints([p1, p2, p3, p4], - this.x + (this.body.width / 2), - this.y + (this.body.height / 2), - -90); + rotatePoints([p1, p2, p3, p4], + this.x + (this.body.width / 2), + this.y + (this.body.height / 2), + -90); } else if ( hasState(this, STATE_FACE_RIGHT) ) { - rotateAllpoints([p1, p2, p3, p4], - this.x + (this.body.width / 2), - this.y + (this.body.height / 2), - 90); + rotatePoints([p1, p2, p3, p4], + this.x + (this.body.width / 2), + this.y + (this.body.height / 2), + 90); } else if ( hasState(this, STATE_FACE_DOWN) ) { - rotateAllpoints([p1, p2, p3, p4], - this.x + (this.body.width / 2), - this.y + (this.body.height / 2), - 180); + rotatePoints([p1, p2, p3, p4], + this.x + (this.body.width / 2), + this.y + (this.body.height / 2), + 180); }