1
0
Fork 0

Fixed a freeze when ValueBar was set to 0

This commit is contained in:
Michaël Lemaire 2015-02-03 01:00:00 +01:00 committed by Michaël Lemaire
parent 9b09bb96ec
commit 7c0908b29c

View file

@ -39,8 +39,13 @@ module SpaceTac.View {
// Update graphics representation
update() {
if (this.bar_sprite) {
var dest = this.proportional;
if (dest < 0.00001) {
dest = 0.00001;
}
var tween = this.game.tweens.create(this.bar_sprite.scale);
tween.to({x: this.proportional});
tween.to({x: dest});
tween.start();
}
}