From 418d61e569f364d101062d6685b914b2ee5b3716 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 13 Jul 2014 22:52:58 -0700 Subject: [PATCH] Close #52 : AI was detecting correctly, some sprites were just drawn facing the wrong way at initialization time --- moonlight/gfx/map.json | 19 ------------------- moonlight/src/AISprite.js | 3 ++- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/moonlight/gfx/map.json b/moonlight/gfx/map.json index 811883b..5408e38 100644 --- a/moonlight/gfx/map.json +++ b/moonlight/gfx/map.json @@ -336,25 +336,6 @@ "x":160, "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, "height":0, diff --git a/moonlight/src/AISprite.js b/moonlight/src/AISprite.js index d375f51..95a75db 100644 --- a/moonlight/src/AISprite.js +++ b/moonlight/src/AISprite.js @@ -841,7 +841,8 @@ var AISprite = function(game, x, y, key, frame) { addAnimation(this, 'bipedrunup'); addAnimation(this, 'bipedrundown'); setMovingState(this, faceStateFromString(this.sprite_facing)); - setSpriteMovement(this); + this.animations.play(getMovingAnimationName(this)); + this.animations.stop(); this.ready_to_update = true; this.runGlintEffect(); }