Size wordbubbles to text
This commit is contained in:
@@ -826,7 +826,8 @@ var AISprite = function(game, x, y, key, frame) {
|
||||
style = {font: '14px Arial Bold', fill: '#ffffff'}
|
||||
this.text_size = stringSize(text, style['font']);
|
||||
bubblegrp = game.state.states.game.bubble_group;
|
||||
this.bubble_sprite = bubblegrp.add.sprite(this.x, this.y, 'wordbubble');
|
||||
console.log(bubblegrp);
|
||||
this.bubble_sprite = game.add.sprite(this.x, this.y, 'wordbubble', bubblegrp);
|
||||
this.bubble_sprite.anchor.setTo(0.5, 1.0);
|
||||
this.bubble_sprite.scale(Number(this.text_size[0] / bubbleimg.width),
|
||||
Number(this.text_size[1] / bubbleimg.height)
|
||||
|
||||
Reference in New Issue
Block a user