Add wandering sprites back to map via map objects

This commit is contained in:
2014-06-13 01:58:29 -07:00
parent bc9aecc084
commit 4a82afda4c

View File

@@ -760,13 +760,14 @@ var AISprite = function(game, x, y, key, frame, spritetype) {
game.physics.arcade.enable(this);
this.body.collideWorldBounds = true;
var ARGH = spritenames_by_type[spritetype];
ARGH = ARGH.split("-");
this.sprite_group = ARGH[0] + "-" + ARGH[1];
if ( (typeof this.sprite_name) !== undefined ) {
this.sprite_name = spritenames_by_type[spritetype];
var ARGH = spritenames_by_type[spritetype];
ARGH = ARGH.split("-");
this.sprite_group = ARGH[0] + "-" + ARGH[1];
} else {
this.sprite_name = "townsfolk-male-1"
this.sprite_name = "townsfolk-male-1";
this.sprite_group = "townsfolk-male";
}
addAnimation(this, 'bipedwalkleft');