From 875ef03d035c35b165bf11427c060b2c0ebeb628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Thu, 22 Jan 2015 01:00:00 +0100 Subject: [PATCH] Added animation on ValueBar --- src/scripts/view/common/ValueBar.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/view/common/ValueBar.ts b/src/scripts/view/common/ValueBar.ts index c9adf44..d1f9dc4 100644 --- a/src/scripts/view/common/ValueBar.ts +++ b/src/scripts/view/common/ValueBar.ts @@ -39,7 +39,9 @@ module SpaceTac.View { // Update graphics representation update() { if (this.bar_sprite) { - this.bar_sprite.scale.x = this.proportional; + var tween = this.game.tweens.create(this.bar_sprite.scale); + tween.to({x: this.proportional}); + tween.start(); } }