public Song(JSONNode jsonNode, JSONNode difficultyNode) { id = jsonNode["key"]; beatname = jsonNode["name"]; ownerid = jsonNode["uploaderId"]; downloads = jsonNode["downloadCount"]; upvotes = jsonNode["upVotes"]; downvotes = jsonNode["downVotes"]; plays = jsonNode["playedCount"]; beattext = jsonNode["description"]; uploadtime = jsonNode["createdAt"]; songName = jsonNode["songName"]; songSubName = jsonNode["songSubName"]; authorName = jsonNode["authorName"]; beatsPerMinute = jsonNode["bpm"]; coverUrl = jsonNode["coverUrl"]; downloadUrl = jsonNode["downloadUrl"]; difficultyLevels = new DifficultyLevel[difficultyNode.Count]; for (int i = 0; i < difficultyNode.Count; i++) { difficultyLevels[i] = new DifficultyLevel(difficultyNode[i]["difficulty"], difficultyNode[i]["difficultyRank"], difficultyNode[i]["audioPath"], difficultyNode[i]["jsonPath"]); } }
public DifficultyLevel[] ConvertDifficultyLevels(CustomSongInfo.DifficultyLevel[] _difficultyLevels) { DifficultyLevel[] buffer = new DifficultyLevel[_difficultyLevels.Length]; for (int i = 0; i < _difficultyLevels.Length; i++) { buffer[i] = new DifficultyLevel(_difficultyLevels[i]); } return(buffer); }
public DifficultyLevel[] ConvertDifficultyLevels(LevelStaticData.DifficultyLevel[] _difficultyLevels) { if (_difficultyLevels != null && _difficultyLevels.Length > 0) { DifficultyLevel[] buffer = new DifficultyLevel[_difficultyLevels.Length]; for (int i = 0; i < _difficultyLevels.Length; i++) { buffer[i] = new DifficultyLevel(_difficultyLevels[i]); } return(buffer); } else { return(null); } }
public Song(JSONNode jsonNode) { id = jsonNode["id"]; beatname = jsonNode["beatname"]; ownerid = jsonNode["ownerid"]; downloads = jsonNode["downloads"]; upvotes = jsonNode["upvotes"]; beattext = jsonNode["beattext"]; uploadtime = jsonNode["uploadtime"]; songName = jsonNode["songName"]; songSubName = jsonNode["songSubName"]; authorName = jsonNode["authorName"]; beatsPerMinute = jsonNode["beatsPerMinute"]; img = jsonNode["img"]; difficultyLevels = new DifficultyLevel[jsonNode["difficultyLevels"].Count]; for (int i = 0; i < jsonNode["difficultyLevels"].Count; i++) { difficultyLevels[i] = new DifficultyLevel(jsonNode["difficultyLevels"][i]["difficulty"], jsonNode["difficultyLevels"][i]["difficultyRank"], jsonNode["difficultyLevels"][i]["audioPath"], jsonNode["difficultyLevels"][i]["jsonPath"]); } }
public bool Compare(DifficultyLevel compareTo) { return(difficulty == compareTo.difficulty && difficultyRank == compareTo.difficultyRank && audioPath == compareTo.audioPath && jsonPath == compareTo.jsonPath); }