Skip to content

Commit

Permalink
Press B for BSides in Freeplay
Browse files Browse the repository at this point in the history
  • Loading branch information
poec987 committed Jun 17, 2024
1 parent 6aa3082 commit 829b4d8
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions source/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FreeplayState extends MusicBeatState
grpSongs = new FlxTypedGroup<Alphabet>();
add(grpSongs);

refreshSongList();
refreshSongList(true);

scoreText = new FlxText(FlxG.width * 0.7, 5, 0, "", 32);
// scoreText.autoSize = false;
Expand Down Expand Up @@ -150,15 +150,21 @@ class FreeplayState extends MusicBeatState
addWeek(['Senpai', 'Roses', 'Thorns'], 6, ['senpai', 'senpai', 'spirit']);
}

public function refreshSongList() {
// I WANT TO FUCKING SHOOT MYSELF

for (i in 0...songs.length) {
grpSongs.members[i].destroy();
iconArray[i].destroy();
}
public function refreshSongList(skipDestroy:Bool=false) {
if (!skipDestroy) {
for (i in 0...grpSongs.length) {
grpSongs.members[i].destroy();
}

grpSongs.clear();
iconArray = [];
for (i in 0...iconArray.length) {
iconArray[i].destroy();
}

iconArray = [];
grpSongs.clear();
}

for (i in 0...songs.length)
{
Expand All @@ -178,6 +184,7 @@ class FreeplayState extends MusicBeatState
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
// songText.screenCenter(X);
}
//trace("Icons: "+iconArray);
}

override function update(elapsed:Float)
Expand Down Expand Up @@ -214,7 +221,7 @@ class FreeplayState extends MusicBeatState
{
bside = true;
songs = [];
addSong("Tutorial BSide", 1, 'gf');
addSong("Tutorial-BSide", 1, 'gf');
refreshSongList();
} else if (b && bside)
{
Expand Down

0 comments on commit 829b4d8

Please sign in to comment.