private void _SetSureBtnContent(Button _button) { var img = _button.gameObject.GetComponentEx <Image> ("Image"); _imgLoad = new UIImageDisplay(img); _imgLoad.Load(UIOtherCardWindowController.imgSurePath); }
private void SetRawImageProTex(UIImageDisplay rawImage, string path) { if (rawImage != null) { rawImage.Load(path); } }
private void _SetHeorCardData(Image img, PlayerInfo player, int index, bool isWin = false) { var go = img.gameObject; var lb_name = go.GetComponentEx <Text> (Layout.lb_username); lb_name.text = player.playerName; var lb_money = go.GetComponentEx <Text> (Layout.lb_money); var tmpStr = player.totalMoney.ToString(); if (player.totalMoney >= 10000) { tmpStr = string.Format("{0}{1}", ((float)((int)(player.totalMoney * 100 / 10000) / 100)).ToString(), "万"); } lb_money.text = tmpStr; var lb_time = go.GetComponentEx <Text> (Layout.lb_timescore); lb_time.text = player.timeScore.ToString(); var lb_quality = go.GetComponentEx <Text> (Layout.lb_qualityscore); lb_quality.text = player.qualityScore.ToString(); var imgload = go.GetComponentEx <Image> (Layout.img_roleImg); var roleimg = new UIImageDisplay(imgload); roleimg.Load(player.playerImgPath); _loadImgList.Add(roleimg); var rankTxt = go.GetComponentEx <Text> (Layout.lb_rank); if (isWin == true) { rankTxt.text = "No.1"; } else if (isWin == false) { rankIndex++; rankTxt.text = "No." + rankIndex.ToString(); var tmpPosition = img_lose.transform.localPosition; go.transform.localScale = Vector3.one; Console.WriteLine("当前的排名是:" + rankIndex.ToString()); go.transform.localPosition = new Vector3(_positionX[rankIndex - 2], tmpPosition.y, tmpPosition.z); } }