void SetNotReady() { IsNotReady = true; // dateTime: "20160426053000", string dateTime = UtilMgr.IsMLB() ? UserMgr.eventJoined.dateTime : UserMgr.eventJoined.korDateTime; string timeZone = UtilMgr.IsMLB() ? "ET" : "KST"; int month = int.Parse(dateTime.Substring(4, 2)); int date = int.Parse(dateTime.Substring(6, 2)); int hour = int.Parse(dateTime.Substring(8, 2)); string min = dateTime.Substring(10, 2); string strTime = Localization.language.Equals("English") ? UtilMgr.GetMonthString(month) + " " + date + ", " + timeZone + " " + UtilMgr.GetAMPM(hour)[0] + ":" + min + " " + UtilMgr.GetAMPM(hour)[1] : month + "월 " + date + "일, " + timeZone + " " + UtilMgr.GetAMPM(hour)[0] + ":" + min + " " + UtilMgr.GetAMPM(hour)[1]; transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("Sprite") .FindChild("NotReady").FindChild("Label1").GetComponent <UILabel>().text = string.Format(UtilMgr.GetLocalText("StrBingoSub1"), strTime); transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("Sprite") .FindChild("NotReady").FindChild("Label2").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrBingoSub2"); transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("Sprite") .FindChild("NotReady").gameObject.SetActive(true); Transform score = transform.FindChild("Top").FindChild("Score"); score.FindChild("AwayScore").GetComponent <UILabel>().text = "0"; score.FindChild("HomeScore").GetComponent <UILabel>().text = "0"; score.FindChild("AwayName").GetComponent <UILabel>().text = UserMgr.eventJoined.awayTeam; score.FindChild("HomeName").GetComponent <UILabel>().text = UserMgr.eventJoined.homeTeam; score.FindChild("AwayName").FindChild("Sprite").gameObject.SetActive(false); score.FindChild("HomeName").FindChild("Sprite").gameObject.SetActive(false); Transform btm = transform.FindChild("Body").FindChild("Scroll View").FindChild("Btm"); btm.FindChild("Info").FindChild("BG").FindChild("LblRound").GetComponent <UILabel>() .text = ""; btm.FindChild("Info").FindChild("BG").FindChild("LblName").FindChild("Label").GetComponent <UILabel>() .text = ""; btm.FindChild("Info").FindChild("BG").FindChild("LblName").GetComponent <UILabel>() .text = ""; btm.FindChild("Info").FindChild("SprCircle").FindChild("Hand").FindChild("Label").GetComponent <UILabel>() .text = ""; transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("BtnBingo").FindChild("Sprite") .gameObject.SetActive(false); transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("BtnBingo") .GetComponent <UIButton>().isEnabled = false; DisableResetBtn(); btm.FindChild("Draggable").GetComponent <UIDraggablePanel2>().RemoveAll(); ShowNext(); }
void InitGames() { Transform tf = transform.FindChild("Changeables").FindChild("Games"); tf.gameObject.SetActive(true); UtilMgr.ClearList(tf.FindChild("Draggable")); tf.FindChild("Draggable").GetComponent <UIDraggablePanel2>().Init(mTeamEvent.Response.data.Count, delegate(UIListItem item, int index) { item.Target.transform.FindChild("SprLeft").FindChild("Label").GetComponent <UILabel>() .text = mTeamEvent.Response.data[index].awayTeamRuns + ""; item.Target.transform.FindChild("SprRight").FindChild("Label").GetComponent <UILabel>() .text = mTeamEvent.Response.data[index].homeTeamRuns + ""; item.Target.transform.FindChild("SprLeft").FindChild("SprEmblem").GetComponent <UISprite>() .spriteName = mTeamEvent.Response.data[index].awayTeamId + ""; item.Target.transform.FindChild("SprRight").FindChild("SprEmblem").GetComponent <UISprite>() .spriteName = mTeamEvent.Response.data[index].homeTeamId + ""; if (!UtilMgr.IsMLB()) { item.Target.transform.FindChild("SprLeft").FindChild("SprEmblem").GetComponent <UISprite>().width = 74; item.Target.transform.FindChild("SprLeft").FindChild("SprEmblem").GetComponent <UISprite>().height = 60; item.Target.transform.FindChild("SprRight").FindChild("SprEmblem").GetComponent <UISprite>().width = 74; item.Target.transform.FindChild("SprRight").FindChild("SprEmblem").GetComponent <UISprite>().height = 60; } item.Target.transform.FindChild("LblCenter").GetComponent <UILabel>() .text = mTeamEvent.Response.data[index].awayTeam + " " + mTeamEvent.Response.data[index].homeTeam; int hour = int.Parse(mTeamEvent.Response.data[index].dateTime.Substring(8, 2)); string min = mTeamEvent.Response.data[index].dateTime.Substring(10, 2); //20160326220500 if (UtilMgr.IsMLB()) { item.Target.transform.FindChild("LblCenter").FindChild("LblUnder").GetComponent <UILabel>() .text = mTeamEvent.Response.data[index].day + " ET " + UtilMgr.GetAMPM(hour)[0] + ":" + min + " " + UtilMgr.GetAMPM(hour)[1]; } else { if (Localization.language.Equals("English")) { item.Target.transform.FindChild("LblCenter").FindChild("LblUnder").GetComponent <UILabel>() .text = mTeamEvent.Response.data[index].day + " KST " + UtilMgr.GetAMPM(hour)[0] + ":" + min + " " + UtilMgr.GetAMPM(hour)[1]; } else { item.Target.transform.FindChild("LblCenter").FindChild("LblUnder").GetComponent <UILabel>() .text = "KST " + UtilMgr.GetAMPM(hour)[0] + ":" + min + " (" + UtilMgr.GetAMPM(hour)[1] + UtilMgr.DayToKorean(mTeamEvent.Response.data[index].day) + ")"; } } }); tf.FindChild("Draggable").GetComponent <UIDraggablePanel2>().ResetPosition(); }
public void InitRegisterEntry(ContestListInfo contestInfo) { // mContestSeq = contestSeq; mContestInfo = contestInfo; string startTime = null; if (UtilMgr.IsMLB()) { startTime = mContestInfo.startTime; } else { startTime = mContestInfo.korStartTime; } int year = 0, mon = 0, day = 0, hour = 0, min = 0, sec = 0; // if(mContestInfo.startTime == null || mContestInfo.startTime.Length < 13){ // mContestTime = new DateTime(2016, 1, 1, 1, 1, 1); // } else{ year = int.Parse(startTime.Substring(0, 4)); mon = int.Parse(startTime.Substring(4, 2)); day = int.Parse(startTime.Substring(6, 2)); hour = int.Parse(startTime.Substring(8, 2)); min = int.Parse(startTime.Substring(10, 2)); sec = int.Parse(startTime.Substring(12, 2)); // } mContestTime = new DateTime(year, mon, day, hour, min, sec); string strMin = "" + min; if (min < 10) { strMin = "0" + min; } if (UtilMgr.IsMLB()) { transform.FindChild("InfoTop").FindChild("Time").FindChild("LblLeft").GetComponent <UILabel>().text = "ET " + UtilMgr.GetAMPM(hour)[0] + ":" + strMin + " " + UtilMgr.GetAMPM(hour)[1] + " " + UtilMgr.GetLocalText("StrStart"); } else { transform.FindChild("InfoTop").FindChild("Time").FindChild("LblLeft").GetComponent <UILabel>().text = "KST " + UtilMgr.GetAMPM(hour)[0] + ":" + strMin + " " + UtilMgr.GetAMPM(hour)[1] + " " + UtilMgr.GetLocalText("StrStart"); } Initialize(); }
// 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(); } }
bool InitPlayerInfo() { // if(UtilMgr.IsMLB()){ // transform.FindChild("Info").FindChild ("MLB").gameObject.SetActive(true); // transform.FindChild("Info").FindChild ("KBO").gameObject.SetActive(false); // // transform.FindChild("Info").FindChild ("MLB").FindChild("Panel").FindChild("Photo").GetComponent<UITexture>().mainTexture = mPhoto; // } else{ transform.FindChild("Body").FindChild("Info").FindChild("MLB").gameObject.SetActive(false); transform.FindChild("Body").FindChild("Info").FindChild("KBO").gameObject.SetActive(true); // } mPlayerInfo = null; try{ mPlayerInfo = UserMgr.PlayerDic[mPlayerId]; }catch {} // foreach( in UserMgr.PlayerList){ // if(info.playerId == ){ // mPlayerInfo = info; // break; // } // } if (mPlayerInfo == null) { // IsInactive = true; DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPlayerInfo"), UtilMgr.GetLocalText("StrPlayerInactive") , DialogueMgr.DIALOGUE_TYPE.Alert, null); return(true); } if (mPlayerInfo.positionNo == 1) { IsPitcher = true; // mHand = info.throwHand.Equals("L") ? UtilMgr.GetLocalText("StrLeft") : UtilMgr.GetLocalText("StrRight"); if (mPlayerInfo.batHand == null) { mHand = ""; } else if (mPlayerInfo.throwHand.Equals("S")) { mHand = UtilMgr.GetLocalText("StrSwitch"); } else if (mPlayerInfo.throwHand.Equals("L")) { mHand = UtilMgr.GetLocalText("StrLeft"); } else { mHand = UtilMgr.GetLocalText("StrRight"); } } else { IsPitcher = false; // mHand = info.batHand.Equals("L") ? UtilMgr.GetLocalText("StrLeft") : UtilMgr.GetLocalText("StrRight"); if (mPlayerInfo.batHand == null) { mHand = ""; } else if (mPlayerInfo.batHand.Equals("S")) { mHand = UtilMgr.GetLocalText("StrSwitch"); } else if (mPlayerInfo.batHand.Equals("L")) { mHand = UtilMgr.GetLocalText("StrLeft"); } else { mHand = UtilMgr.GetLocalText("StrRight"); } } if (mPlayerInfo.injuryYN.Equals("N")) { transform.FindChild("Body").FindChild("Info").FindChild("Injury").gameObject.SetActive(false); } else { transform.FindChild("Body").FindChild("Info").FindChild("Injury").gameObject.SetActive(true); } if (UtilMgr.IsMLB()) { if (mPlayerInfo.firstName.Length < 1) { transform.FindChild("Body").FindChild("Info").FindChild("LblName").GetComponent <UILabel>().text = mPlayerInfo.lastName; } else { transform.FindChild("Body").FindChild("Info").FindChild("LblName").GetComponent <UILabel>().text = mPlayerInfo.firstName.Substring(0, 1) + ". " + mPlayerInfo.lastName; } } else { if (Localization.language.Equals("English")) { if (mPlayerInfo.firstName.Length < 1) { transform.FindChild("Body").FindChild("Info").FindChild("LblName").GetComponent <UILabel>().text = mPlayerInfo.lastName; } else { transform.FindChild("Body").FindChild("Info").FindChild("LblName").GetComponent <UILabel>().text = mPlayerInfo.firstName.Substring(0, 1) + ". " + mPlayerInfo.lastName; } } else { transform.FindChild("Body").FindChild("Info").FindChild("LblName").GetComponent <UILabel>().text = mPlayerInfo.korName; } } transform.FindChild("Body").FindChild("Info").FindChild("LblSaraly").GetComponent <UILabel>().text = "$" + mPlayerInfo.salary; transform.FindChild("Body").FindChild("Info").FindChild("LblFPPG").FindChild("Label").GetComponent <UILabel>().text = string.Format("{0:F1}", mPlayerInfo.fppg); transform.FindChild("Body").FindChild("Info").FindChild("LblPlayed").FindChild("Label").GetComponent <UILabel>().text = "" + mPlayerInfo.games; transform.FindChild("Body").FindChild("Info").FindChild("SprPos").FindChild("Label").GetComponent <UILabel>().text = mPlayerInfo.position; if (IsCard) { transform.FindChild("Body").FindChild("SprGrade").GetComponent <UISprite>().spriteName = "card_top_bg_" + mCardInfo.cardClass; transform.FindChild("Body").FindChild("SprGrade").gameObject.SetActive(true); } else { transform.FindChild("Body").FindChild("SprGrade").gameObject.SetActive(false); } TeamScheduleInfo schedule = null; foreach (TeamScheduleInfo info in UserMgr.ScheduleList) { if (mPlayerInfo.team == info.awayTeamId || mPlayerInfo.team == info.homeTeamId) { schedule = info; break; } } if (schedule != null) { transform.FindChild("Body").FindChild("Info").FindChild("LblPos").GetComponent <UILabel>().text = schedule.awayTeam + " @ " + schedule.homeTeam; int hour = 1; string min = ""; if (UtilMgr.IsMLB()) { hour = int.Parse(schedule.dateTime.Substring(8, 2)); min = schedule.dateTime.Substring(10, 2); transform.FindChild("Body").FindChild("Info").FindChild("LblTime").GetComponent <UILabel>().text = schedule.day + " ET " + UtilMgr.GetAMPM(hour)[0] + ":" + min + " " + UtilMgr.GetAMPM(hour)[1]; } else { hour = int.Parse(schedule.korDateTime.Substring(8, 2)); min = schedule.korDateTime.Substring(10, 2); if (Localization.language.Equals("English")) { transform.FindChild("Body").FindChild("Info").FindChild("LblTime").GetComponent <UILabel>().text = schedule.day + " KST " + UtilMgr.GetAMPM(hour)[0] + ":" + min + " " + UtilMgr.GetAMPM(hour)[1]; } else { transform.FindChild("Body").FindChild("Info").FindChild("LblTime").GetComponent <UILabel>().text = "KST " + UtilMgr.GetAMPM(hour)[0] + ":" + min + " " + UtilMgr.GetAMPM(hour)[1] + " (" + UtilMgr.DayToKorean(schedule.day) + ")"; } } } if (mPhoto == null) { UtilMgr.LoadImage(mPlayerInfo.playerId, transform.FindChild("Body").FindChild("Info").FindChild("KBO").FindChild("Panel") .FindChild("Photo").GetComponent <UITexture>()); } else { transform.FindChild("Body").FindChild("Info").FindChild("KBO").FindChild("Panel").FindChild("Photo") .GetComponent <UITexture>().mainTexture = mPhoto; } return(false); }
void ReceivedDetails() { if (Localization.language.Equals("English")) { transform.FindChild("InfoTop").FindChild("LblTitle").GetComponent <UILabel>().text = mContest.contestName; } else { transform.FindChild("InfoTop").FindChild("LblTitle").GetComponent <UILabel>().text = mContest.contestNameKor; } string strMin = "" + mContestTime.Minute; if (mContestTime.Minute < 10) { strMin = "0" + mContestTime.Minute; } if (UtilMgr.IsMLB()) { transform.FindChild("InfoTop").FindChild("Time").FindChild("LblLeft").GetComponent <UILabel>().text = "ET " + UtilMgr.GetAMPM(mContestTime.Hour)[0] + ":" + strMin + " " + UtilMgr.GetAMPM(mContestTime.Hour)[1] ; //+ " " + UtilMgr.GetLocalText("StrStart"); } else { if (Localization.language.Equals("English")) { transform.FindChild("InfoTop").FindChild("Time").FindChild("LblLeft").GetComponent <UILabel>().text = "KST " + UtilMgr.GetAMPM(mContestTime.Hour)[0] + ":" + strMin + " " + UtilMgr.GetAMPM(mContestTime.Hour)[1] ; //+ " " + UtilMgr.GetLocalText("StrStart"); } else { transform.FindChild("InfoTop").FindChild("Time").FindChild("LblLeft").GetComponent <UILabel>().text = "KST " + UtilMgr.GetAMPM(mContestTime.Hour)[0] + ":" + strMin + " " + UtilMgr.GetAMPM(mContestTime.Hour)[1] ; //+ " " + UtilMgr.GetLocalText("StrStart"); } } transform.FindChild("InfoTop").FindChild("Time").FindChild("LblRight").GetComponent <UILabel>().text = ""; if (mContest.contestStatus == ContestListInfo.STATUS_UP) { transform.FindChild("InfoTop").FindChild("Labels").FindChild("LblEntries").FindChild("Label"). GetComponent <UILabel>().text = "[b]" + UtilMgr.AddsThousandsSeparator(mContestEvent.Response.data.totalJoin) + "[/b][cccccc] / " + UtilMgr.AddsThousandsSeparator(mContestEvent.Response.data.totalEntry); } else { transform.FindChild("InfoTop").FindChild("Labels").FindChild("LblEntries").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrPosition"); transform.FindChild("InfoTop").FindChild("Labels").FindChild("LblEntries").FindChild("Label"). GetComponent <UILabel>().text = "[b]" + UtilMgr.AddsThousandsSeparator(mContestEvent.Response.data.myRank) + "[/b][cccccc] / " + UtilMgr.AddsThousandsSeparator(mContestEvent.Response.data.totalJoin); } transform.FindChild("InfoTop").FindChild("Labels").FindChild("LblTickets").FindChild("Label").GetComponent <UILabel>(). text = mContestEvent.Response.data.entryTicket + ""; transform.FindChild("InfoTop").FindChild("Labels").FindChild("LblPrize").FindChild("Label").GetComponent <UILabel>(). text = mContestEvent.Response.data.totalReward + "G"; InitEntries(); InitGames(); InitPrizes(); InitRules(); transform.FindChild("Selection").FindChild("BtnEntries").GetComponent <ContestDetailBtns>().OnClick(); UtilMgr.AddBackState(UtilMgr.STATE.ContestDetails); UtilMgr.AnimatePageToLeft("MyContests", "ContestDetails"); }