Size wordbubbles to text

This commit is contained in:
2014-06-15 19:33:58 -07:00
parent 73a877adc3
commit ec68d9c187

View File

@@ -845,9 +845,11 @@ var AISprite = function(game, x, y, key, frame) {
this.snap_bubble_position = function() this.snap_bubble_position = function()
{ {
this.bubble_sprite.x = this.x + 16; this.bubble_sprite.x = this.x + 16;
this.bubble_sprite.y = this.y - 33; this.bubble_sprite.y = this.y;
this.bubble_text.position.x = this.bubble_sprite.x + 8; var tx = this.bubble_sprite.x + 8 - (this.text_size[0]/2);
this.bubble_text.position.y = this.bubble_sprite.y + 8; var ty = this.bubble_sprite.y + 8 - (this.text_size[1]/2);
this.bubble_text.position.x = tx;
this.bubble_text.position.y = ty;
} }
this.update = function() this.update = function()