mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-15 19:33:36 +00:00
freeplay menu polish thingie
This commit is contained in:
parent
1a9ae4ba0a
commit
0d3e116d88
|
@ -1,4 +1 @@
|
|||
Tutorial
|
||||
Bopeebo
|
||||
Fresh
|
||||
Dadbattle
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
|
@ -34,7 +34,7 @@ class FreeplayState extends MusicBeatState
|
|||
|
||||
for (i in 0...initSonglist.length)
|
||||
{
|
||||
songs.push(new SongMetadata(initSonglist[i], 1, 'dad'));
|
||||
songs.push(new SongMetadata(initSonglist[i], 1, 'gf'));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -51,6 +51,9 @@ class FreeplayState extends MusicBeatState
|
|||
isDebug = true;
|
||||
#end
|
||||
|
||||
if (StoryMenuState.weekUnlocked[2] || isDebug)
|
||||
addWeek(['Bopeebo', 'Fresh', 'Dadbattle'], 1, ['dad']);
|
||||
|
||||
if (StoryMenuState.weekUnlocked[2] || isDebug)
|
||||
addWeek(['Spookeez', 'South', 'Monster'], 2, ['spooky']);
|
||||
|
||||
|
@ -82,6 +85,11 @@ class FreeplayState extends MusicBeatState
|
|||
songText.isMenuItem = true;
|
||||
songText.targetY = i;
|
||||
grpSongs.add(songText);
|
||||
|
||||
var icon:HealthIcon = new HealthIcon(songs[i].songCharacter);
|
||||
icon.sprTracker = songText;
|
||||
add(icon);
|
||||
|
||||
// songText.x += 40;
|
||||
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
|
||||
// songText.screenCenter(X);
|
||||
|
|
|
@ -4,6 +4,11 @@ import flixel.FlxSprite;
|
|||
|
||||
class HealthIcon extends FlxSprite
|
||||
{
|
||||
/**
|
||||
* Used for FreeplayState! If you use it elsewhere, prob gonna annoying
|
||||
*/
|
||||
public var sprTracker:FlxSprite;
|
||||
|
||||
public function new(char:String = 'bf', isPlayer:Bool = false)
|
||||
{
|
||||
super();
|
||||
|
@ -32,4 +37,12 @@ class HealthIcon extends FlxSprite
|
|||
animation.play(char);
|
||||
scrollFactor.set();
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
super.update(elapsed);
|
||||
|
||||
if (sprTracker != null)
|
||||
setPosition(sprTracker.x + sprTracker.width + 10, sprTracker.y - 30);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue