Making townsfolk report you to a guard
This commit is contained in:
@@ -1066,12 +1066,9 @@ var AISprite = function(game, x, y, key, frame) {
|
|||||||
if (this.target.canSeeSprite(this) == true)
|
if (this.target.canSeeSprite(this) == true)
|
||||||
targetseesyou = true;
|
targetseesyou = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( targetseesyou ||
|
if ( targetseesyou ||
|
||||||
(game.physics.arcade.collide(this, this.target) == true) ) {
|
(game.physics.arcade.collide(this, this.target) == true) ) {
|
||||||
if ( hasState(this, STATE_RUNNINGTOLIGHT) == true ) {
|
if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) {
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
console.log("My target can see me!");
|
console.log("My target can see me!");
|
||||||
this.path_tween_stop();
|
this.path_tween_stop();
|
||||||
this.path_purge();
|
this.path_purge();
|
||||||
|
|||||||
Reference in New Issue
Block a user