Light meter
This commit is contained in:
@@ -944,6 +944,11 @@ GameState.prototype.create = function()
|
||||
'lightbar',
|
||||
0,
|
||||
this.uigroup);
|
||||
this.lightbar_image = game.cache.getImage('lightbar');
|
||||
this.lightbar_crop = new Phaser.Rectangle(this.lightbar.x,
|
||||
this.lightbar.y,
|
||||
game.cache.getImage('lightbar').width,
|
||||
game.cache.getImage('lightbar').height);
|
||||
this.uigroup.setAll('fixedToCamera', true);
|
||||
}
|
||||
|
||||
@@ -1134,8 +1139,8 @@ GameState.prototype.update_player_lightmeter = function() {
|
||||
lightValue = lv;
|
||||
}
|
||||
}, this)
|
||||
|
||||
console.log(lightValue);
|
||||
this.lightbar_crop.width = (this.lightbar_image.width * lightValue);
|
||||
this.lightbar.crop(this.lightbar_crop);
|
||||
}
|
||||
|
||||
GameState.prototype.update = function()
|
||||
|
||||
Reference in New Issue
Block a user