This commit is contained in:
2014-06-15 12:53:45 -07:00
parent e5b2e44a3a
commit 81897bffe5
2 changed files with 50 additions and 5 deletions

View File

@@ -194,14 +194,59 @@
"name":"BigTopGuard", "name":"BigTopGuard",
"properties": "properties":
{ {
"sprite_group":"townsfolk_guard", "sprite_canmove":"false",
"sprite_name":"townsfolk_guard2" "sprite_group":"townsfolk-guard",
"sprite_name":"townsfolk-guard2"
}, },
"type":"AI", "type":"AI",
"visible":true, "visible":true,
"width":0, "width":0,
"x":320, "x":320,
"y":480 "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, "opacity":1,
"type":"objectgroup", "type":"objectgroup",

View File

@@ -748,7 +748,7 @@ var AISprite = function(game, x, y, key, frame) {
} }
} }
if ( this.can_move == false) if ( this.sprite_canmove == false)
return; return;
if ( game.rnd.integerInRange(0, 100) < 95 ) if ( game.rnd.integerInRange(0, 100) < 95 )
return; return;
@@ -784,7 +784,7 @@ var AISprite = function(game, x, y, key, frame) {
this.animations.destroy(); this.animations.destroy();
this.clearWordBubble(); this.clearWordBubble();
this.state = STATE_UNAWARE; 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_player = parseBoolean(this.collide_with_player);
this.collide_with_map = parseBoolean(this.collide_with_map); this.collide_with_map = parseBoolean(this.collide_with_map);
this.carries_light = parseBoolean(this.carries_light); 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); Phaser.Sprite.call(this, game, x, y, null);
game.physics.arcade.enable(this); game.physics.arcade.enable(this);
this.player_seen_timer = null; this.player_seen_timer = null;
this.can_move = 'true'; this.sprite_canmove = 'true';
this.collide_with_player = 'true'; this.collide_with_player = 'true';
this.collide_with_map = 'true'; this.collide_with_map = 'true';
this.carries_light = 'false'; this.carries_light = 'false';