Making townsfolk report you to a guard

This commit is contained in:
2014-06-19 20:56:18 -07:00
parent 23148f4d6d
commit b1e350394c

View File

@@ -1066,12 +1066,9 @@ var AISprite = function(game, x, y, key, frame) {
if (this.target.canSeeSprite(this) == true)
targetseesyou = true;
}
if ( targetseesyou ||
(game.physics.arcade.collide(this, this.target) == true) ) {
if ( hasState(this, STATE_RUNNINGTOLIGHT) == true ) {
return;
} else {
if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) {
console.log("My target can see me!");
this.path_tween_stop();
this.path_purge();