mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-07-03 09:06:49 +00:00
sprites follow rotation of capsule
This commit is contained in:
parent
0dbcc50bcc
commit
5d6264e67e
|
@ -58,10 +58,11 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
|
|
||||||
var rank:String = FlxG.random.getObject(ranks);
|
var rank:String = FlxG.random.getObject(ranks);
|
||||||
|
|
||||||
ranking = new FlxSprite(capsule.width * 0.78, 30);
|
ranking = new FlxSprite(capsule.width * 0.84, 30);
|
||||||
ranking.loadGraphic(Paths.image("freeplay/ranks/" + rank));
|
ranking.loadGraphic(Paths.image("freeplay/ranks/" + rank));
|
||||||
ranking.scale.x = ranking.scale.y = realScaled;
|
ranking.scale.x = ranking.scale.y = realScaled;
|
||||||
ranking.alpha = 0.75;
|
ranking.alpha = 0.75;
|
||||||
|
ranking.origin.set(capsule.origin.x - ranking.x, capsule.origin.y - ranking.y);
|
||||||
add(ranking);
|
add(ranking);
|
||||||
grpHide.add(ranking);
|
grpHide.add(ranking);
|
||||||
|
|
||||||
|
@ -71,6 +72,7 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
diffRank.shader = diffGrayscale;
|
diffRank.shader = diffGrayscale;
|
||||||
diffRank.visible = false;
|
diffRank.visible = false;
|
||||||
add(diffRank);
|
add(diffRank);
|
||||||
|
diffRank.origin.set(capsule.origin.x - diffRank.x, capsule.origin.y - diffRank.y);
|
||||||
grpHide.add(diffRank);
|
grpHide.add(diffRank);
|
||||||
|
|
||||||
switch (rank)
|
switch (rank)
|
||||||
|
@ -85,10 +87,11 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
add(songText);
|
add(songText);
|
||||||
grpHide.add(songText);
|
grpHide.add(songText);
|
||||||
|
|
||||||
pixelIcon = new FlxSprite(80, 35);
|
pixelIcon = new FlxSprite(155, 15);
|
||||||
pixelIcon.makeGraphic(32, 32, 0x00000000);
|
pixelIcon.makeGraphic(32, 32, 0x00000000);
|
||||||
pixelIcon.antialiasing = false;
|
pixelIcon.antialiasing = false;
|
||||||
pixelIcon.active = false;
|
pixelIcon.active = false;
|
||||||
|
|
||||||
add(pixelIcon);
|
add(pixelIcon);
|
||||||
grpHide.add(pixelIcon);
|
grpHide.add(pixelIcon);
|
||||||
|
|
||||||
|
@ -98,9 +101,10 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
favIcon.frames = Paths.getSparrowAtlas('freeplay/favHeart');
|
favIcon.frames = Paths.getSparrowAtlas('freeplay/favHeart');
|
||||||
favIcon.animation.addByPrefix('fav', "favorite heart", 24, false);
|
favIcon.animation.addByPrefix('fav', "favorite heart", 24, false);
|
||||||
favIcon.animation.play('fav');
|
favIcon.animation.play('fav');
|
||||||
favIcon.setGraphicSize(60, 60);
|
favIcon.setGraphicSize(50, 50);
|
||||||
|
favIcon.visible = false;
|
||||||
add(favIcon);
|
add(favIcon);
|
||||||
grpHide.add(favIcon);
|
// grpHide.add(favIcon);
|
||||||
|
|
||||||
setVisibleGrp(false);
|
setVisibleGrp(false);
|
||||||
|
|
||||||
|
@ -165,7 +169,10 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
|
|
||||||
pixelIcon.loadGraphic(Paths.image(charPath));
|
pixelIcon.loadGraphic(Paths.image(charPath));
|
||||||
pixelIcon.setGraphicSize(Std.int(pixelIcon.width * 2));
|
pixelIcon.setGraphicSize(Std.int(pixelIcon.width * 2));
|
||||||
// pixelIcon.updateHitbox();
|
pixelIcon.updateHitbox();
|
||||||
|
pixelIcon.origin.x += 100;
|
||||||
|
// pixelIcon.origin.x = capsule.origin.x;
|
||||||
|
// pixelIcon.offset.x -= pixelIcon.origin.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
var frameInTicker:Float = 0;
|
var frameInTicker:Float = 0;
|
||||||
|
|
Loading…
Reference in a new issue