コード例 #1
0
 public static SongDisplayPackage FillCustomData(SongDisplayPackage songd, string songID)
 {
     if (SongDataLoader.AllSongData.ContainsKey(songID))
     {
         SongDataLoader.SongData currentSong = SongDataLoader.AllSongData[songID];
         if (currentSong.HasCustomData())
         {
             if (currentSong.SongHasCustomDataKey("customEasyTags"))
             {
                 songd.customEasyTags = currentSong.GetCustomData <List <string> >("customEasyTags");
             }
             if (currentSong.SongHasCustomDataKey("customStandardTags"))
             {
                 songd.customStandardTags = currentSong.GetCustomData <List <string> >("customStandardTags");
             }
             if (currentSong.SongHasCustomDataKey("customAdvancedTags"))
             {
                 songd.customAdvancedTags = currentSong.GetCustomData <List <string> >("customAdvancedTags");
             }
             if (currentSong.SongHasCustomDataKey("customExpertTags"))
             {
                 songd.customExpertTags = currentSong.GetCustomData <List <string> >("customExpertTags");
             }
         }
     }
     return(songd);
 }
コード例 #2
0
 public static string GetDifficultyString(SongDisplayPackage songD)
 {
     return("[" +
            (songD.hasEasy ? "<color=#54f719>B</color>" : "") + (songD.hasEasy && (songD.customEasyTags.Count) > 0 ? "<color=#54f719>(" + songD.customEasyTags.ToArray <string>().Join() + ") </color>" : "") +
            (songD.hasStandard ? "<color=#19d2f7>S</color>" : "") + (songD.hasStandard && (songD.customStandardTags.Count) > 0 ? "<color=#19d2f7> (" + songD.customStandardTags.ToArray <string>().Join() + ") </color>" : "") +
            (songD.hasAdvanced ? "<color=#f7a919>A</color>" : "") + (songD.hasAdvanced && (songD.customAdvancedTags.Count) > 0 ? "<color=#f7a919> (" + songD.customAdvancedTags.ToArray <string>().Join() + ") </color>" : "") +
            (songD.hasExpert ? "<color=#b119f7>E</color>" : "") + (songD.hasExpert && (songD.customExpertTags.Count) > 0 ? "<color=#b119f7> (" + songD.customExpertTags.ToArray <string>().Join() + ")</color>" : "") +
            "]");
 }