Size wordbubbles to text
This commit is contained in:
@@ -567,6 +567,7 @@ var moonlightDialog = {
|
|||||||
},
|
},
|
||||||
"townsfolk-guard" : {
|
"townsfolk-guard" : {
|
||||||
"unaware" : [
|
"unaware" : [
|
||||||
|
"This is some\nmultiline text\nin this bitch",
|
||||||
"Just doing my civic duty.",
|
"Just doing my civic duty.",
|
||||||
"Good day, citizens.",
|
"Good day, citizens.",
|
||||||
"Honor. Liberty. Justice.\nOh, and pancakes…\nI love pancakes.",
|
"Honor. Liberty. Justice.\nOh, and pancakes…\nI love pancakes.",
|
||||||
@@ -825,7 +826,8 @@ var AISprite = function(game, x, y, key, frame) {
|
|||||||
|
|
||||||
var mylines = moonlightDialog['status'][this.sprite_group][aistate];
|
var mylines = moonlightDialog['status'][this.sprite_group][aistate];
|
||||||
bubbleimg = game.cache.getImage('wordbubble');
|
bubbleimg = game.cache.getImage('wordbubble');
|
||||||
text = mylines[game.rnd.integerInRange(0, mylines.length-1)];
|
//text = mylines[game.rnd.integerInRange(0, mylines.length-1)];
|
||||||
|
text = mylines[0];
|
||||||
style = {font: '14px Arial Bold', fill: '#ffffff'}
|
style = {font: '14px Arial Bold', fill: '#ffffff'}
|
||||||
this.text_size = stringSize(text, style['font']);
|
this.text_size = stringSize(text, style['font']);
|
||||||
this.bubble_sprite = game.add.sprite(this.x, this.y, 'wordbubble');
|
this.bubble_sprite = game.add.sprite(this.x, this.y, 'wordbubble');
|
||||||
|
|||||||
Reference in New Issue
Block a user