void SetBases() { PlayInfo playInfo = ScriptMainTop.DetailBoard.play; if (playInfo == null) { return; } Transform tfStatus = mBatting.transform.FindChild("SprPitcher").FindChild("StatusInfo"); tfStatus.FindChild("LblNum").GetComponent <UILabel> ().text = string.Format("{0}", playInfo.playRound); tfStatus.FindChild("LblRound").GetComponent <UILabel> ().text = UtilMgr.GetRoundString(playInfo.playRound); tfStatus.FindChild("SprUp").GetComponent <UISprite> ().color = WHITE; tfStatus.FindChild("SprDown").GetComponent <UISprite> ().color = WHITE; if (playInfo.playInningType > 0) { tfStatus.FindChild("SprDown").GetComponent <UISprite> ().color = YELLOW; } else { tfStatus.FindChild("SprUp").GetComponent <UISprite> ().color = YELLOW; } tfStatus.FindChild("SprOut1").GetComponent <UISprite> ().color = WHITE; tfStatus.FindChild("SprOut2").GetComponent <UISprite> ().color = WHITE; switch (playInfo.outCount) { case 2: tfStatus.FindChild("SprOut2").GetComponent <UISprite> ().color = RED; goto case 1; case 1: tfStatus.FindChild("SprOut1").GetComponent <UISprite> ().color = RED; break; } tfStatus.FindChild("SprBases").FindChild("Base1").gameObject.SetActive(false); tfStatus.FindChild("SprBases").FindChild("Base2").gameObject.SetActive(false); tfStatus.FindChild("SprBases").FindChild("Base3").gameObject.SetActive(false); if (playInfo.base1st > 0) { tfStatus.FindChild("SprBases").FindChild("Base1").gameObject.SetActive(true); } if (playInfo.base2nd > 0) { tfStatus.FindChild("SprBases").FindChild("Base2").gameObject.SetActive(true); } if (playInfo.base3rd > 0) { tfStatus.FindChild("SprBases").FindChild("Base3").gameObject.SetActive(true); } }
// IEnumerator WriteTimer(){ // System.DateTime now = System.DateTime.Now; // while(mStop){ // // } // // yield return 0; // } void ReceivedRT() { bool DonotDelete = false; if (mMatchCnt == mRTEvent.Response.data.Count) { DonotDelete = true; } if (!DonotDelete) { UtilMgr.ClearList(transform.FindChild("ScrollRT")); } float width = 720f; for (int i = 0; i < mRTEvent.Response.data.Count; i++) { Transform item = null; if (!DonotDelete) { item = Instantiate(mItemRT).transform; item.parent = transform.FindChild("ScrollRT"); item.localPosition = new Vector3(width * i, 1f, 1f); item.localScale = new Vector3(1f, 1f, 1f); item.name = "itemRTList_" + i; } else { item = transform.FindChild("ScrollRT").GetChild(i); } EventInfo data = mRTEvent.Response.data[i]; item.GetComponent <ItemRT>().mEventInfo = data; item.FindChild("Label").GetComponent <UILabel>().text = i + ""; if (i == 0) { item.FindChild("SprBG").FindChild("BtnLeft").GetComponent <BoxCollider2D>().size = Vector2.zero; item.FindChild("SprBG").FindChild("BtnLeft").FindChild("Background") .GetComponent <UISprite>().color = new Color(0f, 0f, 0f, 0f); item.FindChild("SprBG").FindChild("BtnLeft").FindChild("Background (1)") .GetComponent <UISprite>().color = new Color(0f, 0f, 0f, 0f); } else if (i == mRTEvent.Response.data.Count - 1) { item.FindChild("SprBG").FindChild("BtnRight").GetComponent <BoxCollider2D>().size = Vector2.zero; item.FindChild("SprBG").FindChild("BtnRight").FindChild("Background") .GetComponent <UISprite>().color = new Color(0f, 0f, 0f, 0f); item.FindChild("SprBG").FindChild("BtnRight").FindChild("Background (1)") .GetComponent <UISprite>().color = new Color(0f, 0f, 0f, 0f); } if (Localization.language.Equals("English")) { item.FindChild("Top").FindChild("LblStadium").GetComponent <UILabel>().text = data.stadiumName; } else { item.FindChild("Top").FindChild("LblStadium").GetComponent <UILabel>().text = data.korStadiumName; } item.FindChild("Top").FindChild("LblStadium").FindChild("Sprite").localPosition = new Vector3( -((((float)item.FindChild("Top").FindChild("LblStadium").GetComponent <UILabel>().width) / 2f) + 25f), 1f); item.FindChild("Score").FindChild("Left").FindChild("LblScore").GetComponent <UILabel>().text = data.awayTeamRuns + ""; item.FindChild("Score").FindChild("Right").FindChild("LblScore").GetComponent <UILabel>().text = data.homeTeamRuns + ""; item.FindChild("Score").FindChild("Left").FindChild("LblTeam").GetComponent <UILabel>().text = data.awayTeam; item.FindChild("Score").FindChild("Right").FindChild("LblTeam").GetComponent <UILabel>().text = data.homeTeam; item.FindChild("Score").FindChild("Left").FindChild("SprEmblem").GetComponent <UISprite>().spriteName = data.awayTeamId + ""; item.FindChild("Score").FindChild("Right").FindChild("SprEmblem").GetComponent <UISprite>().spriteName = data.homeTeamId + ""; if (!UtilMgr.IsMLB()) { item.FindChild("Score").FindChild("Left").FindChild("SprEmblem").GetComponent <UISprite>().width = 74; item.FindChild("Score").FindChild("Left").FindChild("SprEmblem").GetComponent <UISprite>().height = 60; item.FindChild("Score").FindChild("Right").FindChild("SprEmblem").GetComponent <UISprite>().width = 74; item.FindChild("Score").FindChild("Right").FindChild("SprEmblem").GetComponent <UISprite>().height = 60; } if (data.inningHalf.Equals("T")) { item.FindChild("Score").FindChild("Left").FindChild("SprStar").gameObject.SetActive(true); item.FindChild("Score").FindChild("Right").FindChild("SprStar").gameObject.SetActive(false); if (data.inning < 1) { item.FindChild("Players").GetComponent <UILabel>().text = ""; } else { if (Localization.language.Equals("English")) { item.FindChild("Players").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrTop") + " " + data.inning + UtilMgr.GetRoundString(data.inning); } else { item.FindChild("Players").GetComponent <UILabel>().text = data.inning + UtilMgr.GetRoundString(data.inning) + " " + UtilMgr.GetLocalText("StrTop"); } } item.FindChild("Players").FindChild("Left").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().mainTexture = UtilMgr.GetTextureDefault(); item.FindChild("Players").FindChild("Left").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().color = new Color(1f, 1f, 1f, 50f / 255f); // if(!UtilMgr.IsMLB()) item.FindChild("Players").FindChild("Left").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().width = 70; // UtilMgr.LoadImage(data.hitterPhoto, // item.FindChild("Players").FindChild("Left").FindChild("Frame") // .FindChild("Photo").FindChild("TxtPlayer").GetComponent<UITexture>()); item.FindChild("Players").FindChild("Left") .FindChild("Frame").FindChild("SprPos").FindChild("Label").GetComponent <UILabel>().text = "B"; item.FindChild("Players").FindChild("Right").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().mainTexture = UtilMgr.GetTextureDefault(); item.FindChild("Players").FindChild("Right").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().color = new Color(1f, 1f, 1f, 50f / 255f); // if(!UtilMgr.IsMLB()) item.FindChild("Players").FindChild("Right").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().width = 70; // UtilMgr.LoadImage(data.pitcherPhoto, // item.FindChild("Players").FindChild("Right").FindChild("Frame") // .FindChild("Photo").FindChild("TxtPlayer").GetComponent<UITexture>()); item.FindChild("Players").FindChild("Right") .FindChild("Frame").FindChild("SprPos").FindChild("Label").GetComponent <UILabel>().text = "P"; item.FindChild("Players").FindChild("Left") .FindChild("Frame").FindChild("Label").GetComponent <UILabel>().text = data.hitterName; item.FindChild("Players").FindChild("Right") .FindChild("Frame").FindChild("Label").GetComponent <UILabel>().text = data.pitcherName; } else { item.FindChild("Score").FindChild("Right").FindChild("SprStar").gameObject.SetActive(true); item.FindChild("Score").FindChild("Left").FindChild("SprStar").gameObject.SetActive(false); if (data.inning < 1) { item.FindChild("Players").GetComponent <UILabel>().text = ""; } else { if (Localization.language.Equals("English")) { item.FindChild("Players").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrBottom") + " " + data.inning + UtilMgr.GetRoundString(data.inning); } else { item.FindChild("Players").GetComponent <UILabel>().text = data.inning + UtilMgr.GetRoundString(data.inning) + " " + UtilMgr.GetLocalText("StrBottom"); } } item.FindChild("Players").FindChild("Left").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().mainTexture = UtilMgr.GetTextureDefault(); item.FindChild("Players").FindChild("Left").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().color = new Color(1f, 1f, 1f, 50f / 255f); // if(!UtilMgr.IsMLB()) item.FindChild("Players").FindChild("Left").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().width = 70; item.FindChild("Players").FindChild("Right").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().mainTexture = UtilMgr.GetTextureDefault(); item.FindChild("Players").FindChild("Right").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().color = new Color(1f, 1f, 1f, 50f / 255f); // if(!UtilMgr.IsMLB()) item.FindChild("Players").FindChild("Right").FindChild("Frame") .FindChild("Photo").FindChild("TxtPlayer").GetComponent <UITexture>().width = 70; // UtilMgr.LoadImage(data.hitterPhoto, // item.FindChild("Players").FindChild("Right").FindChild("Frame") // .FindChild("Photo").FindChild("TxtPlayer").GetComponent<UITexture>()); item.FindChild("Players").FindChild("Right") .FindChild("Frame").FindChild("SprPos").FindChild("Label").GetComponent <UILabel>().text = "B"; // UtilMgr.LoadImage(data.pitcherPhoto, // item.FindChild("Players").FindChild("Left").FindChild("Frame") // .FindChild("Photo").FindChild("TxtPlayer").GetComponent<UITexture>()); item.FindChild("Players").FindChild("Left") .FindChild("Frame").FindChild("SprPos").FindChild("Label").GetComponent <UILabel>().text = "P"; item.FindChild("Players").FindChild("Right") .FindChild("Frame").FindChild("Label").GetComponent <UILabel>().text = data.hitterName; item.FindChild("Players").FindChild("Left") .FindChild("Frame").FindChild("Label").GetComponent <UILabel>().text = data.pitcherName; } string dateTime = null; if (UtilMgr.IsMLB()) { dateTime = data.dateTime; } else { dateTime = data.korDateTime; } int year = 0, mon = 0, day = 0, hour = 0, min = 0, sec = 0; year = int.Parse(dateTime.Substring(0, 4)); mon = int.Parse(dateTime.Substring(4, 2)); day = int.Parse(dateTime.Substring(6, 2)); hour = int.Parse(dateTime.Substring(8, 2)); min = int.Parse(dateTime.Substring(10, 2)); sec = int.Parse(dateTime.Substring(12, 2)); if (data.status.Equals("Scheduled")) { item.FindChild("BtnEnter").FindChild("LblEnter").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrGameReady"); item.FindChild("BtnEnter").FindChild("Background").GetComponent <UISprite>().color = new Color(255f / 255f, 91f / 255f, 16f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().defaultColor = new Color(255f / 255f, 91f / 255f, 16f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().hover = new Color(255f / 255f, 91f / 255f, 16f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().pressed = new Color(255f / 255f, 91f / 255f, 16f / 255f); item.FindChild("Top").FindChild("SprLive").gameObject.SetActive(false); string strMin = min + " "; if (min < 10) { strMin = "0" + min + " "; } if (UtilMgr.IsMLB()) { item.FindChild("Players").GetComponent <UILabel>().text = "ET " + UtilMgr.GetAMPM(hour)[0] + ":" + strMin + UtilMgr.GetAMPM(hour)[1]; } else { item.FindChild("Players").GetComponent <UILabel>().text = "KST " + UtilMgr.GetAMPM(hour)[0] + ":" + strMin + UtilMgr.GetAMPM(hour)[1]; } } else if (data.status.Equals("InProgress")) { item.FindChild("BtnEnter").FindChild("LblEnter").GetComponent <UILabel>().text = UtilMgr.GetLocalText("LblEnter"); item.FindChild("BtnEnter").FindChild("Background").GetComponent <UISprite>().color = new Color(0 / 255f, 106f / 255f, 216f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().defaultColor = new Color(0 / 255f, 106f / 255f, 216f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().hover = new Color(0 / 255f, 106f / 255f, 216f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().pressed = new Color(1f, 91f / 255f, 16f / 255f); item.FindChild("Top").FindChild("SprLive").gameObject.SetActive(true); if (!UtilMgr.IsMLB()) { if (data.inningState.Equals("END")) { item.FindChild("BtnEnter").FindChild("LblEnter").GetComponent <UILabel>().text = "공수 교대 중"; } } } else if (data.status.Equals("Final")) { item.FindChild("BtnEnter").FindChild("LblEnter").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrGameOver"); item.FindChild("BtnEnter").FindChild("Background").GetComponent <UISprite>().color = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().defaultColor = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().hover = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().pressed = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("Top").FindChild("SprLive").gameObject.SetActive(false); } else if (data.status.Equals("Postponed")) { item.FindChild("BtnEnter").FindChild("LblEnter").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrPostponed"); item.FindChild("BtnEnter").FindChild("Background").GetComponent <UISprite>().color = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().defaultColor = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().hover = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().pressed = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("Top").FindChild("SprLive").gameObject.SetActive(false); } else if (data.status.Equals("Cancel")) { item.FindChild("BtnEnter").FindChild("LblEnter").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrGameCanceled"); item.FindChild("BtnEnter").FindChild("Background").GetComponent <UISprite>().color = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().defaultColor = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().hover = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().pressed = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("Top").FindChild("SprLive").gameObject.SetActive(false); } else { item.FindChild("BtnEnter").FindChild("LblEnter").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrGameOver"); item.FindChild("BtnEnter").FindChild("Background").GetComponent <UISprite>().color = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().defaultColor = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().hover = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("BtnEnter").GetComponent <UIButton>().pressed = new Color(102f / 255f, 102f / 255f, 102f / 255f); item.FindChild("Top").FindChild("SprLive").gameObject.SetActive(false); } if (data.joinYN > 0) { item.FindChild("Top").FindChild("SprJoined").gameObject.SetActive(true); } else { item.FindChild("Top").FindChild("SprJoined").gameObject.SetActive(false); } } // transform.FindChild("ScrollRT").GetComponent<UIScrollView>().ResetPosition(); transform.FindChild("ScrollRT").GetComponent <UICenterOnChild>().Recenter(); if (transform.root.FindChild("Lobby").GetComponent <Lobby>().mState != UtilMgr.STATE.Lobby) { UtilMgr.AnimatePageToRight( transform.root.FindChild("Lobby").GetComponent <Lobby>().mState.ToString(), "Lobby", new EventDelegate(AnimationFinish)); transform.root.FindChild("Lobby").GetComponent <Lobby>().mState = UtilMgr.STATE.Lobby; } else { AnimationFinish(); } }
public void InitBtm() { Transform btm = transform.FindChild("Body").FindChild("Scroll View").FindChild("Btm"); btm.gameObject.SetActive(true); mSortedLineup = new List <PlayerInfo>(); bool foundLast = false; bool isAway = false; if (mLineupResponse.data.inningHalf.Equals("T") && UserMgr.eventJoined.inningState.Equals("ING")) { isAway = true; } if (mLineupResponse.data.inningHalf.Equals("B") && UserMgr.eventJoined.inningState.Equals("END")) { isAway = true; } // T END, B ING // if((mLineupResponse.data.inningHalf.Equals("T") // && UserMgr.eventJoined.inningState.Equals("ING")) // || (mLineupResponse.data.inningHalf.Equals("B") // && UserMgr.eventJoined.inningState.Equals("END"))){ Debug.Log("isAway : " + isAway); if (isAway) { mPitcher = mLineupResponse.data.home.pit; for (int i = 0; i < mLineupResponse.data.away.hit.Count; i++) { if (mLineupResponse.data.away.hit[i].currentBatter > 0) { foundLast = true; for (int j = 0; j < mLineupResponse.data.away.hit.Count; j++) { // if(++i >= mLineupResponse.data.away.hit.Count) i = 0; if (i >= mLineupResponse.data.away.hit.Count) { i = 0; } mSortedLineup.Add(mLineupResponse.data.away.hit[i]); i++; } break; } } if (!foundLast) { for (int j = 0; j < mLineupResponse.data.away.hit.Count; j++) { if (j == 0) { mSortedLineup.Add(mLineupResponse.data.away.hit[mLineupResponse.data.away.hit.Count - 1]); } else { mSortedLineup.Add(mLineupResponse.data.away.hit[j - 1]); } } } } else { mPitcher = mLineupResponse.data.away.pit; for (int i = 0; i < mLineupResponse.data.home.hit.Count; i++) { if (mLineupResponse.data.home.hit[i].currentBatter > 0) { foundLast = true; for (int j = 0; j < mLineupResponse.data.home.hit.Count; j++) { // if(++i >= mLineupResponse.data.home.hit.Count) i = 0; if (i >= mLineupResponse.data.home.hit.Count) { i = 0; } mSortedLineup.Add(mLineupResponse.data.home.hit[i]); i++; } break; } } if (!foundLast) { for (int j = 0; j < mLineupResponse.data.home.hit.Count; j++) { if (j == 0) { mSortedLineup.Add(mLineupResponse.data.home.hit[mLineupResponse.data.away.hit.Count - 1]); } else { mSortedLineup.Add(mLineupResponse.data.home.hit[j - 1]); } } } } btm.FindChild("Info").FindChild("BG").FindChild("LblRound").gameObject.SetActive(true); btm.FindChild("Info").FindChild("BG").FindChild("LblName").gameObject.SetActive(true); if (Localization.language.Equals("English")) { string roundStr = mLineupResponse.data.inningHalf.Equals("T") ? "Top" : "Bot"; roundStr += " " + mLineupResponse.data.inningNumber + UtilMgr.GetRoundString(mLineupResponse.data.inningNumber); btm.FindChild("Info").FindChild("BG").FindChild("LblRound").GetComponent <UILabel>().text = roundStr; btm.FindChild("Info").FindChild("BG").FindChild("LblName").GetComponent <UILabel>().text = mPitcher.playerName; } else { string roundStr = mLineupResponse.data.inningNumber + (mLineupResponse.data.inningHalf.Equals("T") ? "회초" : "회말"); btm.FindChild("Info").FindChild("BG").FindChild("LblRound").GetComponent <UILabel>().text = roundStr; btm.FindChild("Info").FindChild("BG").FindChild("LblName").GetComponent <UILabel>().text = mPitcher.korName; } int width = btm.FindChild("Info").FindChild("BG").FindChild("LblName").GetComponent <UILabel>().width; btm.FindChild("Info").FindChild("BG").FindChild("LblName").FindChild("Label").localPosition = new Vector3(width + 16f, -3f); btm.FindChild("Info").FindChild("BG").FindChild("LblName").FindChild("Label").GetComponent <UILabel>() .text = "#" + mPitcher.backNumber + " ERA " + mPitcher.ERA; btm.FindChild("Info").FindChild("SprCircle").FindChild("Hand").FindChild("Label").GetComponent <UILabel>() .text = mPitcher.throwHand; btm.FindChild("Info").FindChild("SprCircle").FindChild("Photo").FindChild("Panel") .FindChild("Texture").GetComponent <UITexture>().mainTexture = UtilMgr.GetTextureDefault(); btm.FindChild("Info").FindChild("SprCircle").FindChild("Photo").FindChild("Panel") .FindChild("Texture").GetComponent <UITexture>().width = 72; btm.FindChild("Info").FindChild("SprCircle").FindChild("Photo").FindChild("Panel") .FindChild("Texture").GetComponent <UITexture>().height = 90; UtilMgr.LoadImage(mPitcher.playerId, btm.FindChild("Info").FindChild("SprCircle").FindChild("Photo").FindChild("Panel") .FindChild("Texture").GetComponent <UITexture>()); btm.FindChild("Draggable").GetComponent <UIDraggablePanel2>().RemoveAll(); // if(IsEnded){ // ShowGameEnded(); // return; // } // UtilMgr.ClearList(btm.FindChild("Draggable")); btm.FindChild("Draggable").GetComponent <UIPanel>().clipOffset = new Vector2(0, 50f); btm.FindChild("Draggable").localPosition = new Vector3(0, -283f); btm.FindChild("Draggable").GetComponent <UIDraggablePanel2>().Init(mSortedLineup.Count, delegate(UIListItem item, int index) { Transform button = item.Target.transform.FindChild("Scroll View").FindChild("Button"); button.FindChild("Photo").FindChild("Hand").FindChild("Label").GetComponent <UILabel>() .text = mSortedLineup[index].batHand; string avg = mSortedLineup[index].AVG; for (int k = mSortedLineup[index].AVG.Length; k < 5; k++) { avg += "0"; } button.FindChild("Label").GetComponent <UILabel>() .text = "#" + mSortedLineup[index].backNumber + " AVG " + avg; if (Localization.language.Equals("English")) { button.FindChild("LblName").GetComponent <UILabel>() .text = mSortedLineup[index].playerName; } else { button.FindChild("LblName").GetComponent <UILabel>() .text = mSortedLineup[index].korName; } button.FindChild("Photo").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().mainTexture = UtilMgr.GetTextureDefault(); button.FindChild("Photo").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().width = 72; button.FindChild("Photo").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().height = 90; UtilMgr.LoadImage(mSortedLineup[index].playerId, button.FindChild("Photo").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>()); JoinQuizInfo joinInfo = new JoinQuizInfo(); joinInfo.gameId = UserMgr.eventJoined.gameId; joinInfo.bingoId = mBingoId; if (mLineupResponse == null) { return; } joinInfo.inningNumber = mLineupResponse.data.inningNumber; joinInfo.inningHalf = mLineupResponse.data.inningHalf; joinInfo.battingOrder = mSortedLineup[index].battingOrder; joinInfo.playerId = mSortedLineup[index].playerId; // // joinInfo.checkValue = -1; // foreach(CurrentLineupInfo.ForecastInfo forecast in mLineupEvent.Response.data.forecast){ // if(forecast.battingOrder == joinInfo.battingOrder){ // joinInfo.checkValue = forecast.myValue; // break; // } // } // item.Target.GetComponent <ItemBingoList>().Init(joinInfo); if (!UserMgr.eventJoined.status.Equals("Scheduled")) { int lockCnt = 1; if (UtilMgr.IsMLB()) { lockCnt = 2; } if (index < lockCnt) { item.Target.GetComponent <ItemBingoList>().SetToLocking(); } } }); if (UserMgr.eventJoined.status.Equals("Scheduled")) { transform.root.FindChild("LiveBingo").GetComponent <LiveBingoAnimation>().SetItemBlink(-1); } else { transform.root.FindChild("LiveBingo").GetComponent <LiveBingoAnimation>() .SetItemBlink(mSortedLineup[0].playerId); } btm.FindChild("Draggable").GetComponent <UIDraggablePanel2>().ResetPosition(); // UtilMgr.ClearList(btm.FindChild("Draggable")); // float height = 90f; // for(int index = 0; index < mSortedLineup.Count; index++){ // GameObject go = Instantiate(mItemBingoList); // go.transform.parent = btm.FindChild("Draggable"); // go.transform.localScale = new Vector3(1f, 1f, 1f); // go.transform.localPosition = new Vector3(0, height); // height -= 120f; // Transform button = go.transform.FindChild("Scroll View").FindChild("Button"); // button.FindChild("Photo").FindChild("Hand").FindChild("Label").GetComponent<UILabel>() // .text = mSortedLineup[index].batHand; // button.FindChild("Label").GetComponent<UILabel>() // .text = "#" + mSortedLineup[index].backNumber + " AVG " + mSortedLineup[index].AVG; // // if(Localization.language.Equals("English")){ // button.FindChild("LblName").GetComponent<UILabel>() // .text = mSortedLineup[index].playerName; // } else{ // button.FindChild("LblName").GetComponent<UILabel>() // .text = mSortedLineup[index].korName; // } // button.FindChild("Photo").FindChild("Panel").FindChild("Texture").GetComponent<UITexture>().mainTexture // = UtilMgr.GetTextureDefault(); // button.FindChild("Photo").FindChild("Panel").FindChild("Texture").GetComponent<UITexture>().width = 72; // button.FindChild("Photo").FindChild("Panel").FindChild("Texture").GetComponent<UITexture>().height = 90; // UtilMgr.LoadImage(mSortedLineup[index].photoUrl, // button.FindChild("Photo").FindChild("Panel").FindChild("Texture").GetComponent<UITexture>()); // // JoinQuizInfo joinInfo = new JoinQuizInfo(); // joinInfo.gameId = UserMgr.eventJoined.gameId; // joinInfo.bingoId = mBingoId; // joinInfo.inningNumber = mLineupEvent.Response.data.inningNumber; // joinInfo.inningHalf = mLineupEvent.Response.data.inningHalf; // joinInfo.battingOrder = mSortedLineup[index].battingOrder; // joinInfo.playerId = mSortedLineup[index].playerId; // go.GetComponent<ItemBingoList>().Init(joinInfo); // // if(index < 2) // go.GetComponent<ItemBingoList>().SetToLocking(); // } // btm.FindChild("Draggable").GetComponent<UIScrollView>().ResetPosition(); }
public void SetRound(int round) { mRound.GetComponent <UILabel> ().text = round.ToString(); mRound.FindChild("Label").GetComponent <UILabel> ().text = UtilMgr.GetRoundString(round); }