public Vehicle(IJson json) { ID = "vehicles"; Code = ID + "." + json.GetValue("code").ToString(); Name = json.GetValue("code").ToString(); Kill = json.GetValue("kills").GetValue("displayValue").ToString(); KPM = json.GetValue("killsPerMinute").GetValue("displayValue").ToString(); TimePlayed = json.GetValue("timePlayed").GetValue("displayValue").ToString(); Destroyed = json.GetValue("destroyed").GetValue("displayValue").ToString(); TimePlayed = TimePlayed.Replace("h", "时").Replace("m", "分").Replace("s", "秒"); }
public Weapon(IJson json) { ID = "weapons"; Code = ID + "." + json.GetValue("code").ToString(); Name = json.GetValue("code").ToString(); Kill = json.GetValue("kills").GetValue("displayValue").ToString(); KPM = json.GetValue("killsPerMinute").GetValue("displayValue").ToString(); TimePlayed = json.GetValue("timePlayed").GetValue("displayValue").ToString(); ShotsFired = json.GetValue("shotsFired").GetValue("displayValue").ToString(); ShotsHit = json.GetValue("shotsHit").GetValue("displayValue").ToString(); ShotsAccuracy = json.GetValue("ShotsAccuracy").GetValue("displayValue").ToString(); Headshots = json.GetValue("headshots").GetValue("displayValue").ToString(); TimePlayed = TimePlayed.Replace("h", "时").Replace("m", "分").Replace("s", "秒"); }