From b7ff74071c7bdd7242c34ab37d3eaf18a89560d5 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Thu, 12 Jun 2014 01:51:56 -0700 Subject: [PATCH] Moved to graphical word bubbles --- moonlight/js/moonlight-skulk.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index e62fd9f..3442f8d 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -593,8 +593,11 @@ var AISprite = function(game, x, y, spritetype) { this.setWordBubble(); } - this.bubble.x = this.x - (this.bubble.width); - this.bubble.y = this.y - (this.bubble.height); + if ( this.bubble !== null ) { + this.bubble.x = this.x - (this.bubble.width); + this.bubble.y = this.y - (this.bubble.height); + } + switch ( game.rnd.integerInRange(0, 4) ) { case 0: { setSpriteMovement(this, running, 'up');