Light meter
This commit is contained in:
@@ -944,6 +944,11 @@ GameState.prototype.create = function()
|
|||||||
'lightbar',
|
'lightbar',
|
||||||
0,
|
0,
|
||||||
this.uigroup);
|
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);
|
this.uigroup.setAll('fixedToCamera', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1134,8 +1139,8 @@ GameState.prototype.update_player_lightmeter = function() {
|
|||||||
lightValue = lv;
|
lightValue = lv;
|
||||||
}
|
}
|
||||||
}, this)
|
}, this)
|
||||||
|
this.lightbar_crop.width = (this.lightbar_image.width * lightValue);
|
||||||
console.log(lightValue);
|
this.lightbar.crop(this.lightbar_crop);
|
||||||
}
|
}
|
||||||
|
|
||||||
GameState.prototype.update = function()
|
GameState.prototype.update = function()
|
||||||
|
|||||||
Reference in New Issue
Block a user