From 94d805136c61a9dbd01496d00932a6217f593b5c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 22 Jun 2021 20:18:22 -0400 Subject: [PATCH] pixel icon shit in progress --- source/HealthIcon.hx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 8ebb79306..e4024d918 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -46,11 +46,20 @@ class HealthIcon extends FlxSprite { if (animation.getByName(newChar) == null) { - loadGraphic(Paths.image('icons/icon-' + newChar), true, 150, 150); + var imgSize:Int = 150; + + if (newChar.endsWith('pixel')) + imgSize = 32; + + loadGraphic(Paths.image('icons/icon-' + newChar), true, imgSize, imgSize); + animation.add(newChar, [0, 1], 0, false, isPlayer); } animation.play(newChar); char = newChar; + + if (newChar.endsWith('pixel')) + setGraphicSize(150, 150); } }