private IEnumerator QueryRecord() { yield return(StartCoroutine(RecordData.QueryRecord())); var js = RecordData.recordData; if (js != null) { var total = js["total"].AsInt; var keys = new List <string>() { "total", "mvp", "rate", "threeKill", "fourKill", "fiveKill", "totalKill", "dieNum", }; if (total > 0) { var rate = js["mvp"].AsInt * 100 / js["total"].AsInt; js["rate"] = rate + "%"; /* * var con = string.Format(txt, js["total"].AsInt, js["mvp"].AsInt, rate + "%", js["threeKill"].AsInt, * js["fourKill"].AsInt, js["fiveKill"].AsInt, js["totalKill"].AsInt, js["dieNum"]); * GetLabel("Content").text = con; */ var ret = Util.GetAllChild(this.transform, "Label1"); Log.GUI("Label1: " + ret.Count); for (var i = 0; i < keys.Count; i++) { ret[i].GetComponent <UILabel>().text = js[keys[i]]; } } } }