Moved to graphical word bubbles

This commit is contained in:
2014-06-12 01:57:56 -07:00
parent b6a2b48ad1
commit bdc8401b8a

View File

@@ -575,6 +575,9 @@ var AISprite = function(game, x, y, spritetype) {
this.bubble = game.add.sprite(this.x, this.y, myline); this.bubble = game.add.sprite(this.x, this.y, myline);
game.physics.arcade.enable(this.bubble); game.physics.arcade.enable(this.bubble);
this.bubble.x = this.x - (this.bubble.width / 2);
this.bubble.y = this.y - (this.bubble.height);
timer = game.time.create(false); timer = game.time.create(false);
timerev = timer.add(5000, this.clearWordBubble, this); timerev = timer.add(5000, this.clearWordBubble, this);
timer.start() timer.start()
@@ -594,8 +597,8 @@ var AISprite = function(game, x, y, spritetype) {
} }
if ( this.bubble !== null ) { if ( this.bubble !== null ) {
this.bubble.x = this.x - (this.bubble.width / 2); this.bubble.body.velocity.x = this.body.velocity.x;
this.bubble.y = this.y - (this.bubble.height); this.bubble.body.velocity.y = this.body.velocity.y;
} }
switch ( game.rnd.integerInRange(0, 4) ) { switch ( game.rnd.integerInRange(0, 4) ) {