void Update() { transform.FindChild("Top").FindChild("Ruby").FindChild("RubyValue").GetComponent <UILabel> ().text = UtilMgr.AddsThousandsSeparator(UserMgr.UserInfo.userRuby); transform.FindChild("Top").FindChild("Mileage").FindChild("MileageValue").GetComponent <UILabel> ().text = UtilMgr.AddsThousandsSeparator(UserMgr.UserInfo.userDiamond); }
void InitContestItem(UIListItem item, int index) { item.Target.gameObject.transform.FindChild("Button").GetComponent <ItemContestsBtns>() .SetContestSeq(mContestList[index]); if (Localization.language.Equals("English")) { item.Target.gameObject.transform.FindChild("LblTitle") .GetComponent <UILabel>().text = mContestList[index].contestName; } else { item.Target.gameObject.transform.FindChild("LblTitle") .GetComponent <UILabel>().text = mContestList[index].contestNameKor; } item.Target.gameObject.transform.FindChild("LblTotalPrize").FindChild("Label") //enties .GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(mContestList[index].totalReward) + "G"; item.Target.gameObject.transform.FindChild("LblTickets").FindChild("Label") .GetComponent <UILabel>().text = mContestList[index].entryTicket + ""; item.Target.gameObject.transform.FindChild("Lbl1stPrize").FindChild("Label") .GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(mContestList[index].firstRewardGold) + "G"; if (mContestList[index].myEntry > 0) { item.Target.gameObject.transform.FindChild("SprJoin").gameObject.SetActive(true); } else { item.Target.gameObject.transform.FindChild("SprJoin").gameObject.SetActive(false); } item.Target.gameObject.transform.FindChild("LblEntries").FindChild("Label") .GetComponent <UILabel>().text = "[333333][b]" + UtilMgr.AddsThousandsSeparator(mContestList[index].totalJoin) + "[/b][-][666666] / " + UtilMgr.AddsThousandsSeparator(mContestList[index].totalEntry); }
public void Init(GetProfileEvent profileEvent) { mProfileEvent = profileEvent; Transform infoTop = transform.FindChild("Scroll View").FindChild("InfoTop"); if ((mProfileEvent.Response.data.imageName != null) && (mProfileEvent.Response.data.imageName.Length > 0)) { Debug.Log("Image is " + mProfileEvent.Response.data.imageName); } infoTop.FindChild("Frame").FindChild("Label").GetComponent <UILabel>().text = mProfileEvent.Response.data.nick; infoTop.FindChild("LblAccountBalance").FindChild("Label").GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(mProfileEvent.Response.data.gold + ""); infoTop.FindChild("LblAccountBalance").FindChild("Label").FindChild("Sprite").localPosition = new Vector3(-(infoTop.FindChild("LblAccountBalance").FindChild("Label").GetComponent <UILabel>().width + 5), 0); infoTop.FindChild("LblTickets").FindChild("Label").GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(mProfileEvent.Response.data.ticket + ""); infoTop.FindChild("LblTickets").FindChild("Label").FindChild("Sprite").localPosition = new Vector3(-(infoTop.FindChild("LblTickets").FindChild("Label").GetComponent <UILabel>().width + 5), 0); infoTop.FindChild("LblRankingPoint").FindChild("Label").GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(mProfileEvent.Response.data.rankPoint + ""); infoTop.FindChild("LblRankingPoint").FindChild("Label").FindChild("Label").localPosition = new Vector3(-(infoTop.FindChild("LblRankingPoint").FindChild("Label").GetComponent <UILabel>().width + 10), 0); UtilMgr.LoadUserImage(mProfileEvent.Response.data.photoUrl, infoTop.FindChild("Frame").FindChild("Photo") .FindChild("Texture").GetComponent <UITexture>()); }
public void Init(QuizResultResults friend, List <QuizResultGlobal> orders) { mLblname.GetComponent <UILabel> ().text = friend.memberName; mLblGold.GetComponent <UILabel> ().text = UtilMgr.AddsThousandsSeparator(friend.rewardPoint); string order = orders [int.Parse(friend.respValue) - 1].orderTitle; mLblChoice.GetComponent <UILabel> ().text = order; }
void InitTicketList() { float height = 0; UIScrollView scrollview = transform.FindChild("Body").FindChild("Scroll View").GetComponent <UIScrollView>(); for (int i = 0; i < mItemList.Count; i++) { ItemShopGoldInfo shopInfo = mItemList[i]; GameObject go = Instantiate(mItemShop); height = -136f; go.transform.parent = scrollview.transform; go.transform.localScale = new Vector3(1f, 1f, 1f); go.transform.localPosition = new Vector3(0, height * i, 0); go.transform.FindChild("LblTitle").GetComponent <UILabel>().text = shopInfo.productName; go.transform.FindChild("LblDesc").GetComponent <UILabel>().text = shopInfo.productDesc; if (shopInfo.productDesc.IndexOf("BONUS") > -1) { go.transform.FindChild("BtnPhoto").FindChild("Bonus").gameObject.SetActive(true); } else { go.transform.FindChild("BtnPhoto").FindChild("Bonus").gameObject.SetActive(false); } go.transform.FindChild("BtnPhoto").FindChild("Item").GetComponent <UISprite>().spriteName = "shop_tc_ticket"; go.transform.FindChild("BtnPhoto").FindChild("Item").GetComponent <UISprite>().height = 108; go.transform.FindChild("BtnPhoto").FindChild("Item").GetComponent <UISprite>().width = 108; go.transform.FindChild("BtnPhoto").FindChild("SprTicket").gameObject.SetActive(true); go.transform.FindChild("BtnPhoto").FindChild("SprTicket").GetComponent <UISprite>().spriteName = "shop_tc_number_" + (i + 1); go.transform.FindChild("BtnPhoto").FindChild("SprTicket").GetComponent <UISprite>().height = 37; switch (i) { case 0: go.transform.FindChild("BtnPhoto").FindChild("SprTicket").GetComponent <UISprite>().width = 84; break; case 1: go.transform.FindChild("BtnPhoto").FindChild("SprTicket").GetComponent <UISprite>().width = 92; break; case 2: go.transform.FindChild("BtnPhoto").FindChild("SprTicket").GetComponent <UISprite>().width = 93; break; case 3: go.transform.FindChild("BtnPhoto").FindChild("SprTicket").GetComponent <UISprite>().width = 93; break; case 4: go.transform.FindChild("BtnPhoto").FindChild("SprTicket").GetComponent <UISprite>().width = 104; break; } go.transform.FindChild("LblPrice").GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(shopInfo.price); int width = go.transform.FindChild("LblPrice").GetComponent <UILabel>().width; Vector3 oriVec = go.transform.FindChild("LblPrice").FindChild("Sprite").localPosition; go.transform.FindChild("LblPrice").FindChild("Sprite").localPosition = new Vector3(width + 5f, oriVec.y); go.transform.FindChild("BtnRight").GetComponent <ShopItemBtns>().mItemInfo = shopInfo; } scrollview.ResetPosition(); }
void BetMax() { mAmountUse = BET_MAX; if (mAmountUse >= double.Parse(UserMgr.UserInfo.userGoldenBall)) { mAmountUse = double.Parse(UserMgr.UserInfo.userGoldenBall); } mLblUse.text = UtilMgr.AddsThousandsSeparator(mAmountUse); mLblExpect.text = UtilMgr.AddsThousandsSeparator(mAmountUse * float.Parse(QuizMgr.QuizInfo.order [GetIndex(mNameSelectedBtn)].ratio)); }
void BetMax() { mAmountUse = BET_MAX; if (mAmountUse >= double.Parse(UserMgr.UserInfo.userGoldenBall)) { mAmountUse = double.Parse(UserMgr.UserInfo.userGoldenBall); } mLblUse.text = UtilMgr.AddsThousandsSeparator(mAmountUse); mLblExpect.text = UtilMgr.AddsThousandsSeparator(GetExpectGold()); }
public void Init(string btnName) { Transform panel = transform.FindChild("Panel").transform; mBtnCancel = panel.FindChild("Btns").FindChild("BtnCancel").GetComponent <UIButton> (); mBtnConfirm = panel.FindChild("Btns").FindChild("BtnConfirm").GetComponent <UIButton> (); mBtnConfirm2 = panel.FindChild("Btns").FindChild("BtnConfirm2").GetComponent <UIButton> (); mLblGot = mLblGold1.GetComponent <UILabel> (); mLblUse = mLblGold2.GetComponent <UILabel> (); mLblExpect = mLblGold3.GetComponent <UILabel> (); mLblSelectedBase = mLblReward1_1.GetComponent <UILabel> (); mLblSelectedRatio = mLblReward1_2.GetComponent <UILabel> (); mLblCardName = mLblReward2_1.GetComponent <UILabel> (); mLblCardRatio = mLblReward2_2.GetComponent <UILabel> (); mLblTotalRatio = mLblReward3_2.GetComponent <UILabel> (); mNameSelectedBtn = btnName; mSbi = GetBettingItem(); if (mSbi.IsSelected) { mBtnCancel.gameObject.SetActive(true); mBtnConfirm.gameObject.SetActive(true); mBtnConfirm2.gameObject.SetActive(false); } else { mBtnCancel.gameObject.SetActive(false); mBtnConfirm.gameObject.SetActive(false); mBtnConfirm2.gameObject.SetActive(true); } mLblGot.text = UtilMgr.AddsThousandsSeparator(UserMgr.UserInfo.userGoldenBall); mLblUse.text = UtilMgr.AddsThousandsSeparator(mAmountUse); mLblExpect.text = UtilMgr.AddsThousandsSeparator(mAmountUse * float.Parse(QuizMgr.QuizInfo.order [GetIndex(mNameSelectedBtn)].ratio)); mLblSelectedBase.text = QuizMgr.QuizInfo.order [GetIndex(mNameSelectedBtn)].description; mLblSelectedRatio.text = QuizMgr.QuizInfo.order [GetIndex(mNameSelectedBtn)].ratio + "x"; mLblCardName.text = "-"; mLblCardRatio.text = "1x"; float total = float.Parse(QuizMgr.QuizInfo.order [GetIndex(mNameSelectedBtn)].ratio) * 1f; mLblTotalRatio.text = total + "x"; }
void Bet(int amount) { mAmountUse += amount; //if the Amount over the Max then process under if (mAmountUse >= double.Parse(UserMgr.UserInfo.userGoldenBall)) { mAmountUse = double.Parse(UserMgr.UserInfo.userGoldenBall); } if (mAmountUse > BET_MAX) { mAmountUse = BET_MAX; } mLblUse.text = UtilMgr.AddsThousandsSeparator(mAmountUse); mLblExpect.text = UtilMgr.AddsThousandsSeparator(GetExpectGold()); }
public void Proflie() { if (UserMgr.UserInfo != null) { if (UserMgr.UserInfo.Textures != null) { transform.FindChild("Top").FindChild("UserPhoto").FindChild("Photo").FindChild("Texture").GetComponent <UITexture>(). mainTexture = UserMgr.UserInfo.Textures; } transform.FindChild("Top").FindChild("UserName").GetComponent <UILabel>().text = UserMgr.UserInfo.memberName; transform.FindChild("Top").FindChild("Ruby").FindChild("RubyValue").GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(UserMgr.UserInfo.userRuby); transform.FindChild("Top").FindChild("Mileage").FindChild("MileageValue").GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(UserMgr.UserInfo.userDiamond); transform.FindChild("Top").FindChild("PinCode").FindChild("PinCodeValue").GetComponent <UILabel>().text = UserMgr.UserInfo.memPIN; } }
void Bet(int amount) { mAmountUse += amount; //if the Amount over the Max then process under if (mAmountUse >= double.Parse(UserMgr.UserInfo.userGoldenBall)) { mAmountUse = double.Parse(UserMgr.UserInfo.userGoldenBall); } if (mAmountUse > BET_MAX) { mAmountUse = BET_MAX; } mLblUse.text = UtilMgr.AddsThousandsSeparator(mAmountUse); mLblExpect.text = UtilMgr.AddsThousandsSeparator(mAmountUse * float.Parse(QuizMgr.QuizInfo.order [GetIndex(mNameSelectedBtn)].ratio)); }
public void SetDesignated(PlayerInfo info) { mPlayerInfo = info; transform.FindChild("Undesignated").gameObject.SetActive(false); transform.FindChild("Designated").gameObject.SetActive(true); mState = STATE.Designated; transform.FindChild("Designated").FindChild("LblLF").GetComponent <UILabel>().text = mPlayerInfo.position; transform.FindChild("Designated").FindChild("LblSaraly").GetComponent <UILabel>().text = "$" + UtilMgr.AddsThousandsSeparator(mPlayerInfo.salary); if (Localization.language.Equals("English")) { transform.FindChild("Designated").FindChild("LblName").GetComponent <UILabel>().text = mPlayerInfo.firstName.Substring(0, 1) + ". " + mPlayerInfo.lastName; } else { transform.FindChild("Designated").FindChild("LblName").GetComponent <UILabel>().text = mPlayerInfo.korName; } }
public void SetBtmInfo(Transform scrollView) { float listSize = scrollView.GetComponent <UIPanel>().height; // Debug.Log("listSize is "+listSize); mCount = 0; long avg = 0; mTotal = 0; for (int i = 0; i < scrollView.childCount; i++) { ItemPosition item = scrollView.GetChild(i).GetComponent <ItemPosition>(); if ((item.GetPlayerInfo() != null) && (item.mState == BtnPosition.STATE.Designated)) { mCount++; mTotal += item.GetPlayerInfo().salary; } } if (mCount > 0) { avg = mTotal / mCount; } else { avg = mTotal; } int salaryLimit = transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mContestInfo.salaryLimit; transform.FindChild("Labels").FindChild("LblSmall").GetComponent <UILabel>().text = string.Format(UtilMgr.GetLocalText("LblRegEntryInfo"), UtilMgr.AddsThousandsSeparator(avg + ""), mCount); transform.FindChild("Labels").FindChild("LblBig").GetComponent <UILabel>().text = "$" + UtilMgr.AddsThousandsSeparator(mTotal + "") + " [999999]of $" + UtilMgr.AddsThousandsSeparator(salaryLimit); transform.localPosition = new Vector3(0, (-202f - listSize)); }
void InitRubyList() { if (mResPP != null) { if (Application.platform == RuntimePlatform.Android) { if (mResPP.pointpark.android.Equals("on")) { SetBanner(); } } else if (Application.platform == RuntimePlatform.IPhonePlayer) { if (mResPP.pointpark.ios.Equals("on")) { SetBanner(); } } else { SetBanner(); } } for (int i = 1; i < getruby.Response.data.Count + 1; i++) { temp1 = (GameObject)Instantiate(origin1, new Vector3(0, 0, 0), origin1.transform.localRotation); temp1.transform.parent = origin1.transform.parent; temp1.transform.localScale = new Vector3(1, 1, 1); temp1.transform.localPosition = new Vector3(originV1.x, originV1.y - ((i) * gap), originV1.z); temp1.transform.FindChild("LblBody").GetComponent <UILabel> ().text = "루비 " + getruby.Response.data [i - 1].productValue + "개"; temp1.transform.FindChild("LblDescription").GetComponent <UILabel> ().text = getruby.Response.data [i - 1].productDesc; if (Application.platform == RuntimePlatform.IPhonePlayer) { temp1.transform.FindChild("LblPrice").GetComponent <UILabel> ().text = "가격 : $ " + getruby.Response.data [i - 1].priceDesc; } else { temp1.transform.FindChild("LblPrice").GetComponent <UILabel> ().text = "가격 : " + UtilMgr.AddsThousandsSeparator(getruby.Response.data [i - 1].productPrice.ToString()) + "원"; } temp1.transform.FindChild("code").GetComponent <UILabel> ().text = getruby.Response.data [i - 1].productCode; temp1.transform.FindChild("id").GetComponent <UILabel> ().text = getruby.Response.data [i - 1].productId.ToString(); temp1.transform.FindChild("add").FindChild("buyruby").GetComponent <UILabel> ().text = getruby.Response.data [i - 1].productValue.ToString(); temp1.transform.FindChild("add").FindChild("addruby").GetComponent <UILabel> ().text = getruby.Response.data [i - 1].bonusRuby.ToString(); temp1.transform.FindChild("add").FindChild("addgold").GetComponent <UILabel> ().text = getruby.Response.data [i - 1].bonusGoldenball.ToString(); // Debug.Log("ruby code : " + getruby.Response.data [i].productCode); temp1.transform.FindChild("SprImgItem").GetComponent <UISprite> ().spriteName = getruby.Response.data [i - 1].rubyImage; temp1.gameObject.SetActive(true); } transform.FindChild("category 1").GetComponent <UIScrollView> ().ResetPosition(); }
void InitUpcomingList() { float stackedHeight = 0f; GameObject go = Instantiate(mItemBlank); go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); go.transform.localPosition = new Vector3(0, 0); go.transform.localScale = new Vector3(1f, 1f, 1f); stackedHeight -= 12f; for (int i = 0; i < mList.Count; i++) { ContestListInfo info = mList[i]; if ((i == 0) || (mList[i - 1].startTime != info.startTime)) { go = Instantiate(mItemUpcomingInfo); go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); stackedHeight -= 30f; go.transform.localPosition = new Vector3(0, stackedHeight); stackedHeight -= 30f; go.transform.localScale = new Vector3(1f, 1f, 1f); go.transform.FindChild("Time").FindChild("Label").GetComponent <UILabel>().text = info.gameDayString; } go = Instantiate(mItemUpcomingSub); go.transform.FindChild("BG").GetComponent <ItemMyContests>().mContestInfo = mList[i]; go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); stackedHeight -= 276f / 2f; go.transform.localPosition = new Vector3(0, stackedHeight); stackedHeight -= 276 / 2f; go.transform.localScale = new Vector3(1f, 1f, 1f); if (Localization.language.Equals("English")) { go.transform.FindChild("LblTitle").GetComponent <UILabel>().text = info.contestName; } else { go.transform.FindChild("LblTitle").GetComponent <UILabel>().text = info.contestNameKor; } SetContestType(info, go.transform.FindChild("LblTitle").gameObject); go.transform.FindChild("LblEntries").FindChild("Label").GetComponent <UILabel>().text = "[333333][b]" + UtilMgr.AddsThousandsSeparator(info.totalJoin) + "[/b][-][666666] / " + UtilMgr.AddsThousandsSeparator(info.totalEntry); go.transform.FindChild("LblTickets").FindChild("Label").GetComponent <UILabel>().text = info.entryTicket + ""; go.transform.FindChild("LblBasicRP").FindChild("Label").GetComponent <UILabel>().text = "[333333]0"; go.transform.FindChild("Lbl1stPrize").FindChild("Label").GetComponent <UILabel>().text = "[fc5034]" + info.firstRewardGold + "G"; go.transform.FindChild("Lineup").FindChild("Label").GetComponent <UILabel>().text = info.entryPlayers; if ((info.lineupName != null) && (info.lineupName.Length > 0)) { go.transform.FindChild("Lineup").FindChild("Sprite").gameObject.SetActive(true); go.transform.FindChild("Lineup").FindChild("Label").localPosition = new Vector3(0, -20f, 0); go.transform.FindChild("Lineup").FindChild("Sprite").FindChild("Label").GetComponent <UILabel>().text = info.lineupName; } else { go.transform.FindChild("Lineup").FindChild("Sprite").gameObject.SetActive(false); go.transform.FindChild("Lineup").FindChild("Label").localPosition = new Vector3(0, -8f, 0); } } transform.FindChild("Body").FindChild("Scroll View").GetComponent <UIScrollView>().ResetPosition(); }
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"); }
void InitItem(UIListItem item, int index) { PlayerInfo info = mPlayerList[index]; if (info.IsCard) { item.Target.transform.FindChild("Main").gameObject.SetActive(false); item.Target.transform.FindChild("Sub").gameObject.SetActive(true); Transform tf = item.Target.transform.FindChild("Sub"); Debug.Log("korname is " + info.korName); tf.GetComponent <ItemSelectPlayerSub>().mPlayerInfo = info; tf.FindChild("LblSalaryB").GetComponent <UILabel>().text = "[s]$ " + UtilMgr.AddsThousandsSeparator(info.salary_org + ""); tf.FindChild("LblSalary").GetComponent <UILabel>().text = "$ " + UtilMgr.AddsThousandsSeparator(info.salary + ""); tf.FindChild("Level").FindChild("LblLV").FindChild("Label").GetComponent <UILabel>().text = info.level + ""; tf.FindChild("LblSkill").FindChild("Label").GetComponent <UILabel>().text = "1"; tf.FindChild("SprPhoto").GetComponent <UISprite>().spriteName = "starcard_" + info.grade; for (int i = 0; i < 6; i++) { tf.FindChild("Level").FindChild("Star" + (i + 1)).GetComponent <UISprite>() .color = new Color(102f / 255f, 102f / 255f, 102f / 255f); } for (int i = 0; i < info.grade; i++) { tf.FindChild("Level").FindChild("Star" + (i + 1)).GetComponent <UISprite>() .color = new Color(252f / 255f, 133f / 255f, 53f / 255f); } } else { item.Target.transform.FindChild("Main").gameObject.SetActive(true); item.Target.transform.FindChild("Sub").gameObject.SetActive(false); Transform tf = item.Target.transform.FindChild("Main"); tf.GetComponent <ItemSelectPlayerMain>().mPlayerInfo = info; tf.FindChild("LblPosition").GetComponent <UILabel>().text = info.position; if (Localization.language.Equals("English")) { tf.FindChild("LblName").GetComponent <UILabel>().text = info.firstName + " " + info.lastName; if (tf.FindChild("LblName").GetComponent <UILabel>().width > 232) { tf.FindChild("LblName").GetComponent <UILabel>().text = info.firstName.Substring(0, 1) + ". " + info.lastName; } tf.FindChild("LblTeam").GetComponent <UILabel>().text = info.city + " " + info.teamName; } else { tf.FindChild("LblName").GetComponent <UILabel>().text = info.korName; tf.FindChild("LblTeam").GetComponent <UILabel>().text = info.korTeamName; } tf.FindChild("LblFPPG").FindChild("LblFPPGV").GetComponent <UILabel>().text = string.Format("{0:F1}", info.fppg); tf.FindChild("LblPlayed").FindChild("LblPlayedV").GetComponent <UILabel>().text = info.games + ""; // tf.FindChild("LblYear").GetComponent<UILabel>().gameObject.SetActive(false); tf.FindChild("LblSalary").GetComponent <UILabel>().text = "$ " + UtilMgr.AddsThousandsSeparator(info.salary); item.Target.transform.FindChild("Main").FindChild("MLB").gameObject.SetActive(false); item.Target.transform.FindChild("Main").FindChild("KBO").gameObject.SetActive(true); tf = item.Target.transform.FindChild("Main").FindChild("KBO"); if ((info.injuryYN != null) && (info.injuryYN.Equals("Y"))) { tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("SprInjury").gameObject.SetActive(true); } else { tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("SprInjury").gameObject.SetActive(false); } TeamScheduleInfo schedule = null; foreach (TeamScheduleInfo team in UserMgr.ScheduleList) { if (info.team == team.awayTeamId || info.team == team.homeTeamId) { if (team.dateTime.Equals( transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mContestInfo.startTime)) { schedule = team; break; } } } if (schedule != null) { item.Target.transform.FindChild("Main").FindChild("LblYear").GetComponent <UILabel>().text = schedule.awayTeam + " @ " + schedule.homeTeam; } else { item.Target.transform.FindChild("Main").FindChild("LblYear").gameObject.SetActive(false); } tf.FindChild("BtnPhoto") .FindChild("Panel").FindChild("TxtPlayer").GetComponent <UITexture>().mainTexture = UtilMgr.GetTextureDefault(); tf.FindChild("BtnPhoto") .FindChild("Panel").FindChild("TxtPlayer").GetComponent <UITexture>().color = new Color(1f, 1f, 1f, 50f / 255f); UtilMgr.LoadImage(info.playerId , tf.FindChild("BtnPhoto") .FindChild("Panel").FindChild("TxtPlayer").GetComponent <UITexture>()); } }
void SetTopInfo() { mLblDia.GetComponent <UILabel> ().text = UtilMgr.AddsThousandsSeparator(UserMgr.UserInfo.userDiamond); //mLblGold.GetComponent<UILabel> ().text = UtilMgr.AddsThousandsSeparator(UserMgr.UserInfo.userGoldenBall); mLblRuby.GetComponent <UILabel> ().text = UtilMgr.AddsThousandsSeparator(UserMgr.UserInfo.userRuby); }
void item() { for (int i = 0; i < getitem.Response.data.Count; i++) { temp3 = (GameObject)Instantiate(origin3, new Vector3(0, 0, 0), origin3.transform.localRotation); temp3.transform.parent = origin3.transform.parent; temp3.transform.localScale = new Vector3(1, 1, 1); temp3.transform.localPosition = new Vector3(originV3.x, originV3.y - (i * gap), originV3.z); temp3.transform.FindChild("LblBody").GetComponent <UILabel> ().text = getitem.Response.data [i].productName.ToString(); temp3.transform.FindChild("LblDescription").GetComponent <UILabel> ().text = getitem.Response.data [i].productDesc; string value; if (getitem.Response.data[i].purchaseType == 3) { value = "루비"; } else { value = "마일리지"; } temp3.transform.FindChild("LblPrice").GetComponent <UILabel> ().text = "가격 : " + UtilMgr.AddsThousandsSeparator(getitem.Response.data [i].productPrice.ToString()) + value; //Debug.Log (getitem.Response.data [i].productCode); temp3.transform.FindChild("buygold").GetComponent <UILabel> ().text = getitem.Response.data [i].productPrice.ToString(); temp3.transform.FindChild("id").GetComponent <UILabel> ().text = getitem.Response.data [i].productId.ToString(); if (getitem.Response.data [i].productCode == "GACHA_500" || getitem.Response.data [i].productCode == "GACHA_1500") { temp3.transform.FindChild("SprImgItem").GetComponent <UISprite> ().spriteName = "mileage"; } else { temp3.transform.FindChild("SprImgItem").GetComponent <UISprite> ().spriteName = getitem.Response.data [i].productImage; } //temp3.transform.FindChild ("SprImgItem").GetComponent<UISprite> ().spriteName = "img_gold_00"+((i%3)+1).ToString(); temp3.gameObject.SetActive(true); } transform.FindChild("category 3").GetComponent <UIScrollView> ().ResetPosition(); transform.FindChild("category 3").gameObject.SetActive(false); // Debug.Log ("getitem.Response.data.Count : " + getitem.Response.data.Count); }
void BetMin() { mAmountUse = BET_MIN; mLblUse.text = UtilMgr.AddsThousandsSeparator(mAmountUse); mLblExpect.text = UtilMgr.AddsThousandsSeparator(mAmountUse * float.Parse(QuizMgr.QuizInfo.order [GetIndex(mNameSelectedBtn)].ratio)); }
// public void RefreshDatas() // { // SetQuizResult (mQuizInfo); // } public void SetQuizResult(QuizInfo quizInfo) { mQuizInfo = quizInfo; mLblReward.SetActive(false); mLblSelect1.SetActive(false); mLblSelect2_1.SetActive(false); mLblSelect2_2.SetActive(false); if (quizInfo.quizValue.Length > 0) { int idx = int.Parse(quizInfo.quizValue) - 1; mLblResult.GetComponent <UILabel>().text = quizInfo.order[idx].description; bool isCorrect = false; QuizRespInfo resp = null; if (quizInfo.resp != null) { for (int i = 0; i < quizInfo.resp.Count; i++) { resp = quizInfo.resp[i]; if (resp.respValue.Equals(quizInfo.quizValue)) { isCorrect = true; break; } } } if (isCorrect) { mLblReward.SetActive(true); mLblReward.GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(resp.expectRewardPoint); } return; } else if (quizInfo.resultMsg.Length > 0) { //need modify mLblResult.GetComponent <UILabel>().text = quizInfo.resultMsg; mLblSelect1.SetActive(true); mLblSelect1.GetComponent <UILabel> ().text = "X"; } if (quizInfo.resp == null) { } else if (quizInfo.resp.Count == 1) { mLblSelect1.SetActive(true); int respValue = int.Parse(quizInfo.resp[0].respValue) - 1; mLblSelect1.GetComponent <UILabel>().text = quizInfo.order[respValue].description; } else if (quizInfo.resp.Count == 2) { mLblSelect2_1.SetActive(true); int respValue = int.Parse(quizInfo.resp[0].respValue) - 1; mLblSelect2_1.GetComponent <UILabel>().text = quizInfo.order[respValue].description; mLblSelect2_2.SetActive(true); respValue = int.Parse(quizInfo.resp[1].respValue) - 1; mLblSelect2_2.GetComponent <UILabel>().text = quizInfo.order[respValue].description; } }
void BetMin() { mAmountUse = BET_MIN; mLblUse.text = UtilMgr.AddsThousandsSeparator(mAmountUse); mLblExpect.text = UtilMgr.AddsThousandsSeparator(GetExpectGold()); }
void InitRecentList() { float stackedHeight = 0f; GameObject go = Instantiate(mItemBlank); go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); go.transform.localPosition = new Vector3(0, 0); go.transform.localScale = new Vector3(1f, 1f, 1f); stackedHeight -= 12f; float totalFP = 0; for (int i = 0; i < mList.Count; i++) { ContestListInfo info = mList[i]; if ((i == 0) || (mList[i - 1].startTime != info.startTime)) { go = Instantiate(mItemSettledInfo); go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); stackedHeight -= 36f; go.transform.localPosition = new Vector3(0, stackedHeight); stackedHeight -= 36f; go.transform.localScale = new Vector3(1f, 1f, 1f); go.transform.FindChild("Time").FindChild("Label").GetComponent <UILabel>().text = info.gameDayString; totalFP = 0; foreach (ContestListInfo info2 in mList) { if (info.startTime == info2.startTime) { totalFP += info2.totalFantasy; } } go.transform.FindChild("Time").FindChild("SprArrow").FindChild("Label").GetComponent <UILabel>().text = string.Format("{0:F1}", totalFP); } go = Instantiate(mItemSettledSub); go.transform.FindChild("BG").GetComponent <ItemMyContests>().mContestInfo = mList[i]; go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); stackedHeight -= 276f / 2f; go.transform.localPosition = new Vector3(0, stackedHeight); stackedHeight -= 276 / 2f; go.transform.localScale = new Vector3(1f, 1f, 1f); if (Localization.language.Equals("English")) { go.transform.FindChild("LblTitle").GetComponent <UILabel>().text = info.contestName; } else { go.transform.FindChild("LblTitle").GetComponent <UILabel>().text = info.contestNameKor; } SetContestType(info, go.transform.FindChild("LblTitle").gameObject); go.transform.FindChild("LblPosition").FindChild("Label").GetComponent <UILabel>().text = "[333333][b]" + UtilMgr.AddsThousandsSeparator(info.myRank) + "[/b][-][666666] / " + UtilMgr.AddsThousandsSeparator(info.totalJoin); go.transform.FindChild("LblTickets").FindChild("Label").GetComponent <UILabel>().text = info.entryTicket + ""; go.transform.FindChild("LblEarnedRP").FindChild("Label").GetComponent <UILabel>().text = "[333333]" + info.myRewardRP + "RP"; go.transform.FindChild("LblEarnedGold").FindChild("Label").GetComponent <UILabel>().text = "[fc5034]" + info.myRewardGold + "G"; go.transform.FindChild("Lineup").FindChild("Label").GetComponent <UILabel>().text = info.entryPlayers; if ((info.lineupName != null) && (info.lineupName.Length > 0)) { go.transform.FindChild("Lineup").FindChild("Sprite").gameObject.SetActive(true); go.transform.FindChild("Lineup").FindChild("Label").localPosition = new Vector3(0, -20f, 0); go.transform.FindChild("Lineup").FindChild("Sprite").FindChild("Label").GetComponent <UILabel>().text = info.lineupName; } else { go.transform.FindChild("Lineup").FindChild("Sprite").gameObject.SetActive(false); go.transform.FindChild("Lineup").FindChild("Label").localPosition = new Vector3(0, -8f, 0); } } transform.FindChild("Body").FindChild("Scroll View").GetComponent <UIScrollView>().ResetPosition(); }
// public void RefreshDatas() // { // SetQuizResult (mQuizInfo); // } public void SetQuizResult(QuizInfo quizInfo) { mQuizInfo = quizInfo; mLblReward.SetActive(false); if (quizInfo.quizValue.Length > 0) { Debug.Log("quizValue : " + quizInfo.quizValue); int idx = int.Parse(quizInfo.quizValue) - 1; mLblResult.GetComponent <UILabel>().text = quizInfo.order[idx].description; bool isCorrect = false; QuizRespInfo resp = null; if (quizInfo.resp != null) { for (int i = 0; i < quizInfo.resp.Count; i++) { resp = quizInfo.resp[i]; if (resp.respValue.Equals(quizInfo.quizValue)) { isCorrect = true; break; } } } if (isCorrect) { mLblReward.SetActive(true); mLblSelect1.SetActive(false); mLblSelect2_1.SetActive(false); mLblSelect2_2.SetActive(false); mLblReward.GetComponent <UILabel>().text = UtilMgr.AddsThousandsSeparator(resp.expectRewardPoint); return; } } else if (quizInfo.resultMsg.Length > 0) { Debug.Log("quiz cancel"); mLblResult.GetComponent <UILabel>().text = quizInfo.resultMsg; // mLblSelect1.SetActive(true); // mLblSelect1.GetComponent<UILabel> ().text = "X"; } try{ if (quizInfo.resp == null || quizInfo.resp.Count == 0) { Debug.Log("quiz1"); mLblSelect1.SetActive(false); mLblSelect2_1.SetActive(false); mLblSelect2_2.SetActive(false); } else if (quizInfo.resp.Count == 1 && quizInfo.resp[0].respValue.Length > 0) { Debug.Log("quiz2"); mLblSelect1.SetActive(true); mLblSelect2_1.SetActive(false); mLblSelect2_2.SetActive(false); Debug.Log("quizInfo.resp[0].respValue : " + quizInfo.resp[0].respValue); int respValue = int.Parse(quizInfo.resp[0].respValue) - 1; mLblSelect1.GetComponent <UILabel>().text = quizInfo.order[respValue].description; } else if (quizInfo.resp.Count == 2) { Debug.Log("quiz3"); mLblSelect1.SetActive(false); mLblSelect2_1.SetActive(true); int respValue = int.Parse(quizInfo.resp[0].respValue) - 1; mLblSelect2_1.GetComponent <UILabel>().text = quizInfo.order[respValue].description; mLblSelect2_2.SetActive(true); Debug.Log("quizInfo.resp[1].respValue : " + quizInfo.resp[1].respValue); respValue = int.Parse(quizInfo.resp[1].respValue) - 1; mLblSelect2_2.GetComponent <UILabel>().text = quizInfo.order[respValue].description; } } catch { Debug.Log("Out of range"); } }
void InitLiveList() { float stackedHeight = 0f; GameObject go = Instantiate(mItemBlank); go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); go.transform.localPosition = new Vector3(0, 0); go.transform.localScale = new Vector3(1f, 1f, 1f); stackedHeight -= 12f; float totalFP = 0; for (int i = 0; i < mList.Count; i++) { ContestListInfo info = mList[i]; if ((i == 0) || (mList[i - 1].startTime != info.startTime)) { go = Instantiate(mItemLiveInfo); go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); stackedHeight -= 36f; go.transform.localPosition = new Vector3(0, stackedHeight); stackedHeight -= 36f; go.transform.localScale = new Vector3(1f, 1f, 1f); go.transform.FindChild("Time").FindChild("Label").GetComponent <UILabel>().text = info.gameDayString; totalFP = 0; foreach (ContestListInfo info2 in mList) { if (info.startTime == info2.startTime) { totalFP += info2.totalFantasy; } } go.transform.FindChild("Time").FindChild("SprArrow").FindChild("Label").GetComponent <UILabel>().text = string.Format("{0:F1}", totalFP); float ratio = info.gameOverPlayers / 9f; int width = (int)(124 * ratio); go.transform.FindChild("Time").FindChild("SprArrow").FindChild("Panel").FindChild("Sprite") .GetComponent <UISprite>().width = width; go.transform.FindChild("Time").FindChild("SprArrow").FindChild("Panel").FindChild("Sprite") .localPosition = new Vector3(-((124 - width) / 2), 0); } go = Instantiate(mItemLiveSub); go.transform.FindChild("BG").GetComponent <ItemMyContests>().mContestInfo = mList[i]; go.transform.parent = transform.FindChild("Body").FindChild("Scroll View"); stackedHeight -= 170f; go.transform.localPosition = new Vector3(0, stackedHeight); stackedHeight -= 170f; go.transform.localScale = new Vector3(1f, 1f, 1f); if (Localization.language.Equals("English")) { go.transform.FindChild("LblTitle").GetComponent <UILabel>().text = info.contestName; } else { go.transform.FindChild("LblTitle").GetComponent <UILabel>().text = info.contestNameKor; } SetContestType(info, go.transform.FindChild("LblTitle").gameObject); go.transform.FindChild("LblPosition").FindChild("Label").GetComponent <UILabel>().text = "[333333][b]" + UtilMgr.AddsThousandsSeparator(info.myRank) + "[/b][-][666666] / " + UtilMgr.AddsThousandsSeparator(info.totalJoin); float ratioLoc = ((float)info.myRank) / ((float)info.totalJoin); go.transform.FindChild("Gauge").FindChild("Panel2").FindChild("SprPin").localPosition = new Vector3(((-672f * ratioLoc) + 336f), 16f); go.transform.FindChild("LblTickets").FindChild("Label").GetComponent <UILabel>().text = info.entryTicket + ""; go.transform.FindChild("LblBasicRP").FindChild("Label").GetComponent <UILabel>().text = "[333333]0"; go.transform.FindChild("Lbl1stPrize").FindChild("Label").GetComponent <UILabel>().text = "[fc5034]" + info.firstRewardGold + "G"; go.transform.FindChild("Gauge").FindChild("Panel2").FindChild("SprPin").FindChild("Label"). GetComponent <UILabel>().text = info.totalFantasy + ""; go.transform.FindChild("Lineup").FindChild("Label").GetComponent <UILabel>().text = info.entryPlayers; if ((info.lineupName != null) && (info.lineupName.Length > 0)) { go.transform.FindChild("Lineup").FindChild("Sprite").gameObject.SetActive(true); go.transform.FindChild("Lineup").FindChild("Label").localPosition = new Vector3(0, -20f, 0); go.transform.FindChild("Lineup").FindChild("Sprite").FindChild("Label").GetComponent <UILabel>().text = info.lineupName; } else { go.transform.FindChild("Lineup").FindChild("Sprite").gameObject.SetActive(false); go.transform.FindChild("Lineup").FindChild("Label").localPosition = new Vector3(0, -8f, 0); } float rewardRatio = 0; if (info.contestType == 1) { rewardRatio = 0.5f; } else { rewardRatio = ((float)info.rewardCount) / ((float)info.totalJoin); if (rewardRatio > 1f) { rewardRatio = 1f; } } float widthf = 672f * rewardRatio; float diff = (672f - widthf) / 2f; go.transform.FindChild("Gauge").FindChild("Panel").GetComponent <UIPanel>().SetRect(widthf, 70f); go.transform.FindChild("Gauge").FindChild("Panel").localPosition = new Vector3(diff, 26f); go.transform.FindChild("Gauge").FindChild("Panel") .FindChild("SprGaugeFront").localPosition = new Vector3(-diff, 0); } transform.FindChild("Body").FindChild("Scroll View").GetComponent <UIScrollView>().ResetPosition(); }
void gold() { for (int i = 0; i < getgold.Response.data.Count; i++) { temp2 = (GameObject)Instantiate(origin2, new Vector3(0, 0, 0), origin2.transform.localRotation); temp2.transform.parent = origin2.transform.parent; temp2.transform.localScale = new Vector3(1, 1, 1); temp2.transform.localPosition = new Vector3(originV2.x, originV2.y - (i * gap), originV2.z); temp2.transform.FindChild("LblBody").GetComponent <UILabel> ().text = getgold.Response.data [i].productName; temp2.transform.FindChild("LblDescription").GetComponent <UILabel> ().text = getgold.Response.data [i].productDesc; temp2.transform.FindChild("LblPrice").GetComponent <UILabel> ().text = "가격 : " + UtilMgr.AddsThousandsSeparator(getgold.Response.data [i].productPrice.ToString()) + "루비"; temp2.transform.FindChild("buygold").GetComponent <UILabel> ().text = getgold.Response.data [i].productPrice.ToString(); temp2.transform.FindChild("id").GetComponent <UILabel> ().text = getgold.Response.data [i].productId.ToString(); temp2.transform.FindChild("Value").GetComponent <UILabel> ().text = getgold.Response.data [i].productValue.ToString(); Debug.Log("gold code : " + getgold.Response.data [i].productCode); float nums = 0; nums = i + 1; if (nums > 2) { nums = 3; } temp2.transform.FindChild("SprImgItem").GetComponent <UISprite> ().spriteName = getgold.Response.data [i].productImage; temp2.gameObject.SetActive(true); } transform.FindChild("category 2").GetComponent <UIScrollView> ().ResetPosition(); transform.FindChild("category 2").gameObject.SetActive(false); }
void Update() { //SetTopInfo (); Point.GetComponent <UILabel> ().text = UtilMgr.AddsThousandsSeparator(MyPoint.ToString()); // Debug.Log("delta time is "+Time.deltaTime); }