Go back to text wordbubbles
This commit is contained in:
@@ -158,21 +158,6 @@
|
||||
"height":100,
|
||||
"name":"AI",
|
||||
"objects":[
|
||||
{
|
||||
"gid":3544,
|
||||
"height":0,
|
||||
"name":"FountainGuard",
|
||||
"properties":
|
||||
{
|
||||
"sprite_group":"townsfolk-female",
|
||||
"sprite_name":"townsfolk-female-3"
|
||||
},
|
||||
"type":"AISprites",
|
||||
"visible":true,
|
||||
"width":0,
|
||||
"x":824,
|
||||
"y":953
|
||||
},
|
||||
{
|
||||
"gid":3544,
|
||||
"height":0,
|
||||
@@ -189,7 +174,7 @@
|
||||
}],
|
||||
"opacity":1,
|
||||
"type":"objectgroup",
|
||||
"visible":false,
|
||||
"visible":true,
|
||||
"width":100,
|
||||
"x":0,
|
||||
"y":0
|
||||
@@ -515,4 +500,4 @@
|
||||
"tilewidth":32,
|
||||
"version":1,
|
||||
"width":100
|
||||
}
|
||||
}
|
||||
@@ -781,7 +781,7 @@ var AISprite = function(game, x, y, key, frame) {
|
||||
this.enableWordBubble = function() {
|
||||
this.enable_word_bubble = true;
|
||||
this.timer = game.time.create(false);
|
||||
var timerdelta = 20000 + (game.rnd.integerInRange(0, 30) * 1000);
|
||||
var timerdelta = 10000 + (game.rnd.integerInRange(0, 20) * 1000);
|
||||
console.log("In " + timerdelta + " ms, " + this + " will say something");
|
||||
timerev = this.timer.add(timerdelta, this.setWordBubble, this);
|
||||
this.timer.start()
|
||||
@@ -840,6 +840,7 @@ var AISprite = function(game, x, y, key, frame) {
|
||||
{
|
||||
this.bubble.position.x = this.x + this.bubble_offsets[0];
|
||||
this.bubble.position.y = this.y + this.bubble_offsets[1];
|
||||
console.log(this);
|
||||
}
|
||||
|
||||
this.update = function()
|
||||
@@ -848,6 +849,7 @@ var AISprite = function(game, x, y, key, frame) {
|
||||
|
||||
if ( this.bubble !== null ) {
|
||||
if ( this.clear_bubble == true ) {
|
||||
console.log(this + " cleared word bubble");
|
||||
this.bubble.destroy();
|
||||
this.bubble = null;
|
||||
this.clear_bubble = false;
|
||||
|
||||
Reference in New Issue
Block a user