fixed #54 it now gets read if it is under 30

This commit is contained in:
Jeena 2014-02-18 14:08:48 +01:00
parent fa1a3f3757
commit 6ba085e3c0

View file

@ -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();