pixel icon placement fix

This commit is contained in:
Cameron Taylor 2022-04-29 21:45:56 -04:00
parent 31b393b014
commit 231f76c893

View file

@ -111,6 +111,8 @@ class HealthIcon extends FlxSprite
this.antialiasing = !isPixel;
this.flipX = playerId == 0;
initTargetSize();
}
function set_characterId(value:String):String
@ -209,6 +211,12 @@ class HealthIcon extends FlxSprite
}
}
inline function initTargetSize()
{
setGraphicSize(150);
updateHitbox();
}
function updateHealthIcon(health:Float)
{
// We want to efficiently handle animation playback