mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-21 09:29:41 +00:00
temp rank stuff in progress
This commit is contained in:
parent
f7bac02ee3
commit
a8e39d90e8
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit 37fa62d8e88b7a7023e689ef52d8a5c527cd4618
|
||||
Subproject commit abbbc89a83f48317568b5b25eaf831ae16f88a8c
|
8
hmm.json
8
hmm.json
|
@ -4,14 +4,14 @@
|
|||
"name": "discord_rpc",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "2d83fa863ef0c1eace5f1cf67c3ac315d1a3a8a5",
|
||||
"ref": "2d83fa8",
|
||||
"url": "https://github.com/Aidan63/linc_discord-rpc"
|
||||
},
|
||||
{
|
||||
"name": "flixel",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "32cee07a0e5f21e590a4b21234603b2cd5898b10",
|
||||
"ref": "32cee07a",
|
||||
"url": "https://github.com/EliteMasterEric/flixel"
|
||||
},
|
||||
{
|
||||
|
@ -32,7 +32,7 @@
|
|||
"name": "flxanimate",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "a9136359271cae6ea3016b7fd9023c5c42562933",
|
||||
"ref": "a913635",
|
||||
"url": "https://github.com/ninjamuffin99/flxanimate"
|
||||
},
|
||||
{
|
||||
|
@ -75,7 +75,7 @@
|
|||
"name": "hxCodec",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "c8c47e706ad82a423783006ed901b6d93c89a421",
|
||||
"ref": "c8c47e7",
|
||||
"url": "https://github.com/polybiusproxy/hxCodec"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -20,6 +20,9 @@ class SongMenuItem extends FlxSpriteGroup
|
|||
|
||||
public var songText:FlxText;
|
||||
public var favIcon:FlxSprite;
|
||||
public var ranking:FlxSprite;
|
||||
|
||||
var ranks:Array<String> = ["fail", "average", "great", "excellent", "perfect"];
|
||||
|
||||
public var targetPos:FlxPoint = new FlxPoint();
|
||||
public var doLerp:Bool = false;
|
||||
|
@ -42,6 +45,20 @@ class SongMenuItem extends FlxSpriteGroup
|
|||
// capsule.animation
|
||||
add(capsule);
|
||||
|
||||
var rank:String = FlxG.random.getObject(ranks);
|
||||
|
||||
ranking = new FlxSprite(capsule.width * 0.78, 30);
|
||||
ranking.loadGraphic(Paths.image("freeplay/ranks/" + rank));
|
||||
ranking.scale.x = ranking.scale.y = realScaled;
|
||||
ranking.alpha = 0.75;
|
||||
add(ranking);
|
||||
|
||||
switch (rank)
|
||||
{
|
||||
case "perfect":
|
||||
ranking.x -= 10;
|
||||
}
|
||||
|
||||
songText = new FlxText(capsule.width * 0.23, 40, 0, songTitle, Std.int(40 * realScaled));
|
||||
songText.font = "5by7";
|
||||
songText.color = 0xFF43C1EA;
|
||||
|
@ -218,12 +235,12 @@ class SongMenuItem extends FlxSpriteGroup
|
|||
|
||||
function set_selected(value:Bool):Bool
|
||||
{
|
||||
// trace(value);
|
||||
|
||||
// cute one liners, lol!
|
||||
songText.alpha = value ? 1 : 0.6;
|
||||
capsule.offset.x = value ? 0 : -5;
|
||||
capsule.animation.play(value ? "selected" : "unselected");
|
||||
ranking.alpha = value ? 1 : 0.7;
|
||||
ranking.color = value ? 0xFFFFFFFF : 0xFFAAAAAA;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue