1
0
Fork 0
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:
Cameron Taylor 2021-03-01 18:59:51 -05:00
parent 1a9ae4ba0a
commit 0d3e116d88
4 changed files with 23 additions and 5 deletions

View file

@ -1,4 +1 @@
Tutorial
Bopeebo
Fresh
Dadbattle

View file

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 144 KiB

View file

@ -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);

View file

@ -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);
}
}