Word bubbles

This commit is contained in:
2014-06-11 23:47:18 -07:00
parent 125ba49bcb
commit 18a5f4ee7e

View File

@@ -322,6 +322,12 @@ Light.prototype = Object.create(Phaser.Sprite.prototype);
Light.prototype.constructor = Light; Light.prototype.constructor = Light;
var AISprite = function(game, x, y, spritetype) { var AISprite = function(game, x, y, spritetype) {
this.clearWordBubble = function()
{
this.bubble.destroy();
this.bubble = null;
}
this.setWordBubble = function() this.setWordBubble = function()
{ {
if ( this.bubble != null || this.sprite_group == undefined) { if ( this.bubble != null || this.sprite_group == undefined) {
@@ -356,12 +362,6 @@ var AISprite = function(game, x, y, spritetype) {
setTimeout(function(){this.clearWordBubble();}, 20000); setTimeout(function(){this.clearWordBubble();}, 20000);
} }
this.clearWordBubble = function()
{
this.bubble.destroy();
this.bubble = null;
}
this.update = function() this.update = function()
{ {
if ( game.rnd.integerInRange(0, 100) < 95 ) if ( game.rnd.integerInRange(0, 100) < 95 )