mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixed #54 it now gets read if it is under 30
This commit is contained in:
parent
fa1a3f3757
commit
6ba085e3c0
1 changed files with 3 additions and 1 deletions
|
|
@ -230,7 +230,9 @@ function (Parent, DomController, PIXI, Settings, NotificationCenter) {
|
||||||
playerInfo.endFill();
|
playerInfo.endFill();
|
||||||
|
|
||||||
if(options.healthFactor > 0) {
|
if(options.healthFactor > 0) {
|
||||||
playerInfo.beginFill(0x00FF00);
|
var color = 0x00FF00;
|
||||||
|
if(options.healthFactor < 0.30) color = 0xFF0000;
|
||||||
|
playerInfo.beginFill(color);
|
||||||
playerInfo.lineStyle(0, 0x000000);
|
playerInfo.lineStyle(0, 0x000000);
|
||||||
playerInfo.drawRect(borderWidth, borderWidth, width * options.healthFactor, height);
|
playerInfo.drawRect(borderWidth, borderWidth, width * options.healthFactor, height);
|
||||||
playerInfo.endFill();
|
playerInfo.endFill();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue