From 1b0de7b3fac4e5f86ced4d42ec96ffa6f7a17064 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sat, 12 Jul 2014 00:01:25 -0700 Subject: [PATCH] Word bubbles no longer show on top of the UI, and the camera deadzone has been reduced to account for the reduced UI space --- moonlight/src/AISprite.js | 5 +++-- moonlight/src/GameStates.js | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/moonlight/src/AISprite.js b/moonlight/src/AISprite.js index 6542257..83c36d6 100644 --- a/moonlight/src/AISprite.js +++ b/moonlight/src/AISprite.js @@ -301,11 +301,12 @@ var AISprite = function(game, x, y, key, frame) { this.text_size = stringSize(text, style['font']); if ( isSet(this.bubble_sprite) == true ) this.bubble_sprite.destroy(); - this.bubble_sprite = game.add.sprite(this.x, this.y, 'wordbubble'); + var bubblegroup = game.state.states.game.bubble_group; + this.bubble_sprite = game.add.sprite(this.x, this.y, 'wordbubble', 0, bubblegroup); this.bubble_sprite.anchor.setTo(0.5, 1.0); this.bubble_sprite.scale.x = Number((this.text_size[0] + 16) / bubbleimg.width); this.bubble_sprite.scale.y = Number((this.text_size[1] + 16) / bubbleimg.height); - this.bubble_text = game.add.text(this.x, this.y, text, style); + this.bubble_text = game.add.text(this.x, this.y, text, style, bubblegroup); this.snap_bubble_position(); this.timer = game.time.create(false); diff --git a/moonlight/src/GameStates.js b/moonlight/src/GameStates.js index 38afda4..6004ff8 100644 --- a/moonlight/src/GameStates.js +++ b/moonlight/src/GameStates.js @@ -127,6 +127,8 @@ GameState.prototype.create = function() this); this.clockTimer.start(); + game.camera.deadzone.height -= 68; + var hudoffset = game.camera.height - 68; this.hud = this.game.add.image(0, hudoffset, 'hud', 0, this.uigroup); this.hud_hourhand = this.game.add.sprite(39,