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:
@@ -301,11 +301,12 @@ var AISprite = function(game, x, y, key, frame) {
|
|||||||
this.text_size = stringSize(text, style['font']);
|
this.text_size = stringSize(text, style['font']);
|
||||||
if ( isSet(this.bubble_sprite) == true )
|
if ( isSet(this.bubble_sprite) == true )
|
||||||
this.bubble_sprite.destroy();
|
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.anchor.setTo(0.5, 1.0);
|
||||||
this.bubble_sprite.scale.x = Number((this.text_size[0] + 16) / bubbleimg.width);
|
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_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.snap_bubble_position();
|
||||||
|
|
||||||
this.timer = game.time.create(false);
|
this.timer = game.time.create(false);
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ GameState.prototype.create = function()
|
|||||||
this);
|
this);
|
||||||
this.clockTimer.start();
|
this.clockTimer.start();
|
||||||
|
|
||||||
|
game.camera.deadzone.height -= 68;
|
||||||
|
|
||||||
var hudoffset = game.camera.height - 68;
|
var hudoffset = game.camera.height - 68;
|
||||||
this.hud = this.game.add.image(0, hudoffset, 'hud', 0, this.uigroup);
|
this.hud = this.game.add.image(0, hudoffset, 'hud', 0, this.uigroup);
|
||||||
this.hud_hourhand = this.game.add.sprite(39,
|
this.hud_hourhand = this.game.add.sprite(39,
|
||||||
|
|||||||
Reference in New Issue
Block a user