freeplay menu polish thingie
This commit is contained in:
parent
bc22d564f6
commit
5632736ed4
@ -1,4 +1 @@
|
|||||||
Tutorial
|
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)
|
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;
|
isDebug = true;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
if (StoryMenuState.weekUnlocked[2] || isDebug)
|
||||||
|
addWeek(['Bopeebo', 'Fresh', 'Dadbattle'], 1, ['dad']);
|
||||||
|
|
||||||
if (StoryMenuState.weekUnlocked[2] || isDebug)
|
if (StoryMenuState.weekUnlocked[2] || isDebug)
|
||||||
addWeek(['Spookeez', 'South', 'Monster'], 2, ['spooky']);
|
addWeek(['Spookeez', 'South', 'Monster'], 2, ['spooky']);
|
||||||
|
|
||||||
@ -82,6 +85,11 @@ class FreeplayState extends MusicBeatState
|
|||||||
songText.isMenuItem = true;
|
songText.isMenuItem = true;
|
||||||
songText.targetY = i;
|
songText.targetY = i;
|
||||||
grpSongs.add(songText);
|
grpSongs.add(songText);
|
||||||
|
|
||||||
|
var icon:HealthIcon = new HealthIcon(songs[i].songCharacter);
|
||||||
|
icon.sprTracker = songText;
|
||||||
|
add(icon);
|
||||||
|
|
||||||
// songText.x += 40;
|
// songText.x += 40;
|
||||||
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
|
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
|
||||||
// songText.screenCenter(X);
|
// songText.screenCenter(X);
|
||||||
|
@ -4,6 +4,11 @@ import flixel.FlxSprite;
|
|||||||
|
|
||||||
class HealthIcon extends 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)
|
public function new(char:String = 'bf', isPlayer:Bool = false)
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
@ -32,4 +37,12 @@ class HealthIcon extends FlxSprite
|
|||||||
animation.play(char);
|
animation.play(char);
|
||||||
scrollFactor.set();
|
scrollFactor.set();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override function update(elapsed:Float)
|
||||||
|
{
|
||||||
|
super.update(elapsed);
|
||||||
|
|
||||||
|
if (sprTracker != null)
|
||||||
|
setPosition(sprTracker.x + sprTracker.width + 10, sprTracker.y - 30);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user