Making townsfolk report you to a guard

This commit is contained in:
2014-06-19 20:58:22 -07:00
parent b1e350394c
commit cd340f9b8c

View File

@@ -1066,10 +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 ( (game.physics.arcade.collide(this, this.target) == true) ||
targetseesyou == true ) {
if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) {
console.log("My target can see me!");
this.path_tween_stop();
this.path_purge();
var staticLights = game.state.states.game.staticLights;