Close #52 : AI was detecting correctly, some sprites were just drawn facing the wrong way at initialization time

This commit is contained in:
2014-07-13 22:52:58 -07:00
parent b888a3f2e0
commit 418d61e569
2 changed files with 2 additions and 20 deletions

View File

@@ -336,25 +336,6 @@
"x":160, "x":160,
"y":832 "y":832
}, },
{
"gid":3544,
"height":0,
"name":"BigTopGuard",
"properties":
{
"sprite_can_see_lightmeter":"0.15",
"sprite_canmove":"false",
"sprite_facing":"down",
"sprite_group":"townsfolk-guard",
"sprite_has_treasure":"true",
"sprite_name":"townsfolk-guard-2"
},
"type":"AI",
"visible":true,
"width":0,
"x":672,
"y":384
},
{ {
"gid":3544, "gid":3544,
"height":0, "height":0,

View File

@@ -841,7 +841,8 @@ var AISprite = function(game, x, y, key, frame) {
addAnimation(this, 'bipedrunup'); addAnimation(this, 'bipedrunup');
addAnimation(this, 'bipedrundown'); addAnimation(this, 'bipedrundown');
setMovingState(this, faceStateFromString(this.sprite_facing)); setMovingState(this, faceStateFromString(this.sprite_facing));
setSpriteMovement(this); this.animations.play(getMovingAnimationName(this));
this.animations.stop();
this.ready_to_update = true; this.ready_to_update = true;
this.runGlintEffect(); this.runGlintEffect();
} }