From 81897bffe5909cb4ca5b0421461dfa1618fb652c Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 15 Jun 2014 12:53:45 -0700 Subject: [PATCH] Map work --- moonlight/gfx/map.json | 49 +++++++++++++++++++++++++++++++-- moonlight/js/moonlight-skulk.js | 6 ++-- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/moonlight/gfx/map.json b/moonlight/gfx/map.json index fdda726..9667ce0 100644 --- a/moonlight/gfx/map.json +++ b/moonlight/gfx/map.json @@ -194,14 +194,59 @@ "name":"BigTopGuard", "properties": { - "sprite_group":"townsfolk_guard", - "sprite_name":"townsfolk_guard2" + "sprite_canmove":"false", + "sprite_group":"townsfolk-guard", + "sprite_name":"townsfolk-guard2" }, "type":"AI", "visible":true, "width":0, "x":320, "y":480 + }, + { + "gid":3544, + "height":0, + "name":"BigTopGuard", + "properties": + { + "sprite_canmove":"false", + "sprite_group":"townsfolk-guard", + "sprite_name":"townsfolk-guard2" + }, + "type":"AI", + "visible":true, + "width":0, + "x":320, + "y":480 + }, + { + "gid":3544, + "height":0, + "name":"BigTopCustomer2", + "properties": + { + "sprite_group":"townsfolk-female" + }, + "type":"AI", + "visible":true, + "width":0, + "x":640, + "y":192 + }, + { + "gid":3544, + "height":0, + "name":"BigTopCustomer2", + "properties": + { + "sprite_group":"townsfolk-male" + }, + "type":"AI", + "visible":true, + "width":0, + "x":128, + "y":320 }], "opacity":1, "type":"objectgroup", diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 943dfd2..c833a18 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -748,7 +748,7 @@ var AISprite = function(game, x, y, key, frame) { } } - if ( this.can_move == false) + if ( this.sprite_canmove == false) return; if ( game.rnd.integerInRange(0, 100) < 95 ) return; @@ -784,7 +784,7 @@ var AISprite = function(game, x, y, key, frame) { this.animations.destroy(); this.clearWordBubble(); this.state = STATE_UNAWARE; - this.can_move = parseBoolean(this.can_move); + this.sprite_canmove = parseBoolean(this.sprite_canmove); this.collide_with_player = parseBoolean(this.collide_with_player); this.collide_with_map = parseBoolean(this.collide_with_map); this.carries_light = parseBoolean(this.carries_light); @@ -818,7 +818,7 @@ var AISprite = function(game, x, y, key, frame) { Phaser.Sprite.call(this, game, x, y, null); game.physics.arcade.enable(this); this.player_seen_timer = null; - this.can_move = 'true'; + this.sprite_canmove = 'true'; this.collide_with_player = 'true'; this.collide_with_map = 'true'; this.carries_light = 'false';