mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-25 16:24:40 +00:00
pure pixel icon support done
This commit is contained in:
parent
f4c3d826f2
commit
6add378535
|
@ -37,6 +37,8 @@ class HealthIcon extends FlxSprite
|
||||||
changeIcon(PlayState.SONG.player1);
|
changeIcon(PlayState.SONG.player1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var pixelArrayFunny:Array<String> = CoolUtil.coolTextFile(Paths.file('images/icons/pixelIcons.txt'));
|
||||||
|
|
||||||
public function changeIcon(newChar:String):Void
|
public function changeIcon(newChar:String):Void
|
||||||
{
|
{
|
||||||
if (newChar != 'bf-pixel' && newChar != 'bf-old')
|
if (newChar != 'bf-pixel' && newChar != 'bf-old')
|
||||||
|
@ -48,7 +50,7 @@ class HealthIcon extends FlxSprite
|
||||||
{
|
{
|
||||||
var imgSize:Int = 150;
|
var imgSize:Int = 150;
|
||||||
|
|
||||||
if (newChar.endsWith('pixel'))
|
if (newChar.endsWith('pixel') || pixelArrayFunny.contains(newChar))
|
||||||
imgSize = 32;
|
imgSize = 32;
|
||||||
|
|
||||||
loadGraphic(Paths.image('icons/icon-' + newChar), true, imgSize, imgSize);
|
loadGraphic(Paths.image('icons/icon-' + newChar), true, imgSize, imgSize);
|
||||||
|
@ -58,7 +60,7 @@ class HealthIcon extends FlxSprite
|
||||||
animation.play(newChar);
|
animation.play(newChar);
|
||||||
char = newChar;
|
char = newChar;
|
||||||
|
|
||||||
if (newChar.endsWith('pixel'))
|
if (newChar.endsWith('pixel') || pixelArrayFunny.contains(newChar))
|
||||||
{
|
{
|
||||||
setGraphicSize(150);
|
setGraphicSize(150);
|
||||||
updateHitbox();
|
updateHitbox();
|
||||||
|
|
Loading…
Reference in a new issue