Add wandering sprites back to map via map objects
This commit is contained in:
@@ -738,11 +738,21 @@ var AISprite = function(game, x, y, key, frame) {
|
||||
}
|
||||
|
||||
this.update_new_values = function() {
|
||||
this.loadTexture(this.sprite_name, 0);
|
||||
setSpriteMovement(this, false, 'down');
|
||||
this.animations.destroy();
|
||||
this.bubble = null;
|
||||
this.clearWordBubble();
|
||||
this.state = STATE_UNAWARE;
|
||||
|
||||
this.loadTexture(this.sprite_name, 0);
|
||||
addAnimation(this, 'bipedwalkleft');
|
||||
addAnimation(this, 'bipedwalkright');
|
||||
addAnimation(this, 'bipedwalkup');
|
||||
addAnimation(this, 'bipedwalkdown');
|
||||
addAnimation(this, 'bipedrunleft');
|
||||
addAnimation(this, 'bipedrunright');
|
||||
addAnimation(this, 'bipedrunup');
|
||||
addAnimation(this, 'bipedrundown');
|
||||
setSpriteMovement(this, false, 'down');
|
||||
}
|
||||
|
||||
var spritenames_by_type = [
|
||||
@@ -763,14 +773,6 @@ var AISprite = function(game, x, y, key, frame) {
|
||||
|
||||
this.sprite_name = "townsfolk-male-1";
|
||||
this.sprite_group = "townsfolk-male";
|
||||
addAnimation(this, 'bipedwalkleft');
|
||||
addAnimation(this, 'bipedwalkright');
|
||||
addAnimation(this, 'bipedwalkup');
|
||||
addAnimation(this, 'bipedwalkdown');
|
||||
addAnimation(this, 'bipedrunleft');
|
||||
addAnimation(this, 'bipedrunright');
|
||||
addAnimation(this, 'bipedrunup');
|
||||
addAnimation(this, 'bipedrundown');
|
||||
this.update_new_values();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user