1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-08-20 15:35:13 +00:00

pure pixel icon support done

This commit is contained in:
Cameron Taylor 2021-06-22 21:11:06 -04:00
parent f4c3d826f2
commit 6add378535

View file

@ -37,6 +37,8 @@ class HealthIcon extends FlxSprite
changeIcon(PlayState.SONG.player1);
}
var pixelArrayFunny:Array<String> = CoolUtil.coolTextFile(Paths.file('images/icons/pixelIcons.txt'));
public function changeIcon(newChar:String):Void
{
if (newChar != 'bf-pixel' && newChar != 'bf-old')
@ -48,7 +50,7 @@ class HealthIcon extends FlxSprite
{
var imgSize:Int = 150;
if (newChar.endsWith('pixel'))
if (newChar.endsWith('pixel') || pixelArrayFunny.contains(newChar))
imgSize = 32;
loadGraphic(Paths.image('icons/icon-' + newChar), true, imgSize, imgSize);
@ -58,7 +60,7 @@ class HealthIcon extends FlxSprite
animation.play(newChar);
char = newChar;
if (newChar.endsWith('pixel'))
if (newChar.endsWith('pixel') || pixelArrayFunny.contains(newChar))
{
setGraphicSize(150);
updateHitbox();