Add wandering sprites back to map via map objects
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user