Word bubbles no longer show on top of the UI, and the camera deadzone has been reduced to account for the reduced UI space

This commit is contained in:
2014-07-12 00:01:25 -07:00
parent 8eebcb25ec
commit 1b0de7b3fa
2 changed files with 5 additions and 2 deletions

View File

@@ -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);

View File

@@ -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,