From 15a57a34affa312f64e9973b979f4c80c287db25 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 1 Mar 2021 16:46:08 -0500 Subject: [PATCH] song icon formatting --- source/FreeplayState.hx | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index f8bb333e9..d00b40264 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -34,7 +34,7 @@ class FreeplayState extends MusicBeatState for (i in 0...initSonglist.length) { - songs.push(new SongMetadata(initSonglist[i], 1)); + songs.push(new SongMetadata(initSonglist[i], 1, 'dad')); } /* @@ -52,19 +52,19 @@ class FreeplayState extends MusicBeatState #end if (StoryMenuState.weekUnlocked[2] || isDebug) - addWeek(['Spookeez', 'South', 'Monster'], 2); + addWeek(['Spookeez', 'South', 'Monster'], 2, ['spooky']); if (StoryMenuState.weekUnlocked[3] || isDebug) - addWeek(['Pico', 'Philly', 'Blammed'], 3); + addWeek(['Pico', 'Philly', 'Blammed'], 3, ['pico']); if (StoryMenuState.weekUnlocked[4] || isDebug) - addWeek(['Satin-Panties', 'High', 'Milf'], 4); + addWeek(['Satin-Panties', 'High', 'Milf'], 4, ['mom']); if (StoryMenuState.weekUnlocked[5] || isDebug) - addWeek(['Cocoa', 'Eggnog', 'Winter-Horrorland'], 5); + addWeek(['Cocoa', 'Eggnog', 'Winter-Horrorland'], 5, ['parents-christmas', 'parents-christmas', 'monster-christmas']); if (StoryMenuState.weekUnlocked[6] || isDebug) - addWeek(['Senpai', 'Roses', 'Thorns'], 6); + addWeek(['Senpai', 'Roses', 'Thorns'], 6, ['senpai', 'senpai', 'spirit']); // LOAD MUSIC @@ -135,16 +135,23 @@ class FreeplayState extends MusicBeatState super.create(); } - public function addSong(songName:String, weekNum:Int) + public function addSong(songName:String, weekNum:Int, songCharacter:String) { - songs.push(new SongMetadata(songName, weekNum)); + songs.push(new SongMetadata(songName, weekNum, songCharacter)); } - public function addWeek(songs:Array, weekNum:Int) + public function addWeek(songs:Array, weekNum:Int, ?songCharacters:Array) { + if (songCharacters == null) + songCharacters = ['bf']; + + var num:Int = 0; for (song in songs) { - addSong(song, weekNum); + addSong(song, weekNum, songCharacters[num]); + + if (songCharacters.length != 1) + num++; } } @@ -277,10 +284,12 @@ class SongMetadata { public var songName:String = ""; public var week:Int = 0; + public var songCharacter:String = ""; - public function new(song:String, week:Int) + public function new(song:String, week:Int, songCharacter:String) { this.songName = song; this.week = week; + this.songCharacter = songCharacter; } }