From 24977c25268b5d88a304d4df1e63cffc2caecf6f Mon Sep 17 00:00:00 2001 From: M&M Date: Thu, 29 Apr 2021 22:57:16 -0700 Subject: [PATCH] improve code on removing AA from pixel icons --- source/HealthIcon.hx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 2625d95..74f46a1 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -15,7 +15,7 @@ class HealthIcon extends FlxSprite loadGraphic(Paths.image('iconGrid'), true, 150, 150); - + antialiasing = true; animation.add('bf', [0, 1], 0, false, isPlayer); animation.add('bf-car', [0, 1], 0, false, isPlayer); animation.add('bf-christmas', [0, 1], 0, false, isPlayer); @@ -38,16 +38,13 @@ class HealthIcon extends FlxSprite animation.add('monster', [19, 20], 0, false, isPlayer); animation.add('monster-christmas', [19, 20], 0, false, isPlayer); animation.play(char); - switch(char){ - case 'bf-pixel' | 'senpai' | 'senpai-angry' | 'spirit' | 'gf-pixel': - { - } - default: - { - antialiasing = true; - } + switch(char) + { + case 'bf-pixel' | 'senpai' | 'senpai-angry' | 'spirit' | 'gf-pixel': + antialiasing = false; } + scrollFactor.set(); }