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);
|
game.physics.arcade.enable(this);
|
||||||
this.body.collideWorldBounds = true;
|
this.body.collideWorldBounds = true;
|
||||||
|
if ( (typeof this.sprite_name) !== undefined ) {
|
||||||
|
this.sprite_name = spritenames_by_type[spritetype];
|
||||||
var ARGH = spritenames_by_type[spritetype];
|
var ARGH = spritenames_by_type[spritetype];
|
||||||
ARGH = ARGH.split("-");
|
ARGH = ARGH.split("-");
|
||||||
this.sprite_group = ARGH[0] + "-" + ARGH[1];
|
this.sprite_group = ARGH[0] + "-" + ARGH[1];
|
||||||
if ( (typeof this.sprite_name) !== undefined ) {
|
|
||||||
this.sprite_name = spritenames_by_type[spritetype];
|
|
||||||
} else {
|
} else {
|
||||||
this.sprite_name = "townsfolk-male-1"
|
this.sprite_name = "townsfolk-male-1";
|
||||||
|
this.sprite_group = "townsfolk-male";
|
||||||
}
|
}
|
||||||
|
|
||||||
addAnimation(this, 'bipedwalkleft');
|
addAnimation(this, 'bipedwalkleft');
|
||||||
|
|||||||
Reference in New Issue
Block a user