public void AddCustomLevel(CustomLevel customLevel) { var characteristics = new List <BeatmapCharacteristicSO>(); foreach (CustomSongInfo.DifficultyLevel diffLevel in customLevel.customSongInfo.difficultyLevels) { switch (diffLevel.characteristic) { case "": if (!characteristics.Contains(_standardCharacteristic)) { characteristics.Add(_standardCharacteristic); } break; case "Standard": if (!characteristics.Contains(_standardCharacteristic)) { characteristics.Add(_standardCharacteristic); } break; case "One Saber": if (!characteristics.Contains(_oneSaberCharacteristic)) { characteristics.Add(_oneSaberCharacteristic); } break; case "No Arrows": if (!characteristics.Contains(_noArrowsCharacteristic)) { characteristics.Add(_noArrowsCharacteristic); } break; default: BeatmapCharacteristicSO characteristic = SongLoader.customCharacteristics.FirstOrDefault(x => x.characteristicName == diffLevel.characteristic); if (characteristic != null) { characteristics.Add(characteristic); } else if (!characteristics.Contains(SongLoader.customCharacteristics.First(x => x.characteristicName == "Missing Characteristic"))) { characteristics.Add(SongLoader.customCharacteristics.First(x => x.characteristicName == "Missing Characteristic")); } break; } } customLevel.SetBeatmapCharacteristics(characteristics.ToArray()); // customLevel.SetDifficultyBeatmaps(_beatmapLevels, characteristics[0]); _levelList.Add(customLevel); UpdateArray(); }
public void AddCustomLevel(CustomLevel customLevel) { var characteristics = new List <BeatmapCharacteristicSO> { _standardCharacteristic, _noArrowsCharacteristic }; if (customLevel.customSongInfo.oneSaber) { characteristics.Add(_oneSaberCharacteristic); } customLevel.SetBeatmapCharacteristics(characteristics.ToArray()); _levelList.Add(customLevel); UpdateArray(); }