From 18a5f4ee7e70a484e5e7718080a3f6ab03c10429 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Wed, 11 Jun 2014 23:47:18 -0700 Subject: [PATCH] Word bubbles --- moonlight/js/moonlight-skulk.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 4227989..1584b2b 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -322,6 +322,12 @@ Light.prototype = Object.create(Phaser.Sprite.prototype); Light.prototype.constructor = Light; var AISprite = function(game, x, y, spritetype) { + this.clearWordBubble = function() + { + this.bubble.destroy(); + this.bubble = null; + } + this.setWordBubble = function() { if ( this.bubble != null || this.sprite_group == undefined) { @@ -356,12 +362,6 @@ var AISprite = function(game, x, y, spritetype) { setTimeout(function(){this.clearWordBubble();}, 20000); } - this.clearWordBubble = function() - { - this.bubble.destroy(); - this.bubble = null; - } - this.update = function() { if ( game.rnd.integerInRange(0, 100) < 95 )