Modify the alpha of the light meter as well as the scale

This commit is contained in:
2014-07-12 08:38:31 -07:00
parent 4404f86595
commit a62f30ba5c

View File

@@ -293,6 +293,7 @@ GameState.prototype.update_player_lightmeter = function() {
player.lightmeter += lightValue; player.lightmeter += lightValue;
player.lightmeter = Math.min(player.lightmeter, 1.0); player.lightmeter = Math.min(player.lightmeter, 1.0);
this.lightbar.scale.y = player.lightmeter; this.lightbar.scale.y = player.lightmeter;
this.lightbar.alpha = 0.5 + (player.lightmeter / 2);
//this.lightbar_crop.width = ((this.lightbar_image.width) * player.lightmeter); //this.lightbar_crop.width = ((this.lightbar_image.width) * player.lightmeter);
//this.lightbar.crop(this.lightbar_crop); //this.lightbar.crop(this.lightbar_crop);
} }