Making townsfolk report you to a guard
This commit is contained in:
@@ -1062,9 +1062,11 @@ var AISprite = function(game, x, y, key, frame) {
|
|||||||
}
|
}
|
||||||
if ( this.target !== null ) {
|
if ( this.target !== null ) {
|
||||||
var targetseesyou = false;
|
var targetseesyou = false;
|
||||||
if ((typeof this.target.canSeeSprite !== undefined) &&
|
if (typeof this.target.canSeeSprite !== undefined) {
|
||||||
(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) == true ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user