public void OnClick() { UtilMgr.AddBackState(UtilMgr.STATE.SelectPlayer); UtilMgr.AnimatePageToLeft("RegisterEntry", "SelectPlayer"); transform.root.FindChild("SelectPlayer").GetComponent <SelectPlayer>() .Init(int.Parse(transform.FindChild("Label").GetComponent <UILabel>().text)); }
void ReceivedEntry() { UtilMgr.AddBackState(UtilMgr.STATE.RegisterEntry); UtilMgr.AnimatePageToLeft("Contests", "RegisterEntry"); transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().InitRegisterEntry(mContestInfo , mLineupEvent.Response.data); }
void ReceivedUserRanking() { transform.FindChild("Body").FindChild("ScrollUser").gameObject.SetActive(true); transform.FindChild("Body").FindChild("ScrollPlayer").gameObject.SetActive(false); UtilMgr.ClearList(transform.FindChild("Body").FindChild("ScrollUser")); transform.FindChild("Body").FindChild("ScrollUser").GetComponent <UIDraggablePanel2>().Init( mUserEvent.Response.data.Count, delegate(UIListItem item, int index) { item.Target.transform.FindChild("SprRankbox").FindChild("Label").GetComponent <UILabel>() .text = mUserEvent.Response.data[index].rank + ""; item.Target.transform.FindChild("LblName").GetComponent <UILabel>() .text = mUserEvent.Response.data[index].name; item.Target.transform.FindChild("LblPtLeft").GetComponent <UILabel>() .text = mUserEvent.Response.data[index].rankPoint + ""; item.Target.transform.FindChild("SprPhotoBG").FindChild("Photo").FindChild("Texture") .GetComponent <UITexture>().mainTexture = UtilMgr.GetTextureDefault(); UtilMgr.LoadUserImage(mUserEvent.Response.data[index].photoUrl, item.Target.transform.FindChild("SprPhotoBG").FindChild("Photo").FindChild("Texture") .GetComponent <UITexture>()); }); transform.FindChild("Body").FindChild("ScrollUser").GetComponent <UIDraggablePanel2>().ResetPosition(); if (NeedAnimation) { UtilMgr.AddBackState(UtilMgr.STATE.Ranking); UtilMgr.AnimatePageToLeft("Lobby", "Ranking"); } }
void ReceivedCardShop() { UtilMgr.AddBackState(UtilMgr.STATE.Shop); UtilMgr.AnimatePageToLeft("MyCards", "Shop"); transform.root.FindChild("Shop").GetComponent <Shop>().InitItemShop( UtilMgr.GetLocalText("LblCardShop"), Shop.CARD, mGoldEvent); }
public void Init() { UserMgr.eventJoined = null; UtilMgr.AddBackState(UtilMgr.STATE.Lobby); mLobbyEvent = new GetLobbyInfoEvent(ReceivedLobbyInfo); NetMgr.GetLobbyInfo(UserMgr.UserInfo.memSeq, mLobbyEvent); }
void ReceivedSkillShop() { UtilMgr.AddBackState(UtilMgr.STATE.Shop); UtilMgr.AnimatePageToLeft("SkillList", "Shop"); transform.root.FindChild("Shop").GetComponent <Shop>().InitItemShop( UtilMgr.GetLocalText("LblSkillsetShop"), Shop.SKILL, mGoldEvent); }
void ReceivedMail() { UtilMgr.AddBackState(UtilMgr.STATE.MyCards); // UtilMgr.AnimatePage(UtilMgr.DIRECTION.ToLeft, // transform.root.FindChild("Lobby").gameObject, // transform.root.FindChild("MyCards").gameObject); UtilMgr.AnimatePageToLeft("Lobby", "MyCards"); transform.root.FindChild("MyCards").GetComponent <MyCards>().Init(mCardEvent, mMailEvent); }
void ReceivedTicketShop() { UtilMgr.RemoveBackState(UtilMgr.STATE.Profile); UtilMgr.AnimatePageToLeft(UtilMgr.GetLastBackState().ToString(), "Shop"); UtilMgr.AddBackState(UtilMgr.STATE.Shop); transform.root.FindChild("Shop").GetComponent <Shop>().InitItemShop( UtilMgr.GetLocalText("StrTicketShop"), Shop.TICKET, mItemEvent); }
public void Init() { transform.localPosition = new Vector3(2000f, 2000f); transform.gameObject.SetActive(true); Buildup(); UtilMgr.AddBackState(UtilMgr.STATE.PlayerRecords); UtilMgr.AnimatePageToLeft("Lobby", "PlayerRecords"); }
void ReceivedContest() { UtilMgr.AddBackState(UtilMgr.STATE.Contests); // UtilMgr.AnimatePage(UtilMgr.DIRECTION.ToLeft, // transform.root.FindChild("Lobby").gameObject, // transform.root.FindChild("Contests").gameObject); UtilMgr.AnimatePageToLeft("Lobby", "Contests"); transform.root.FindChild("Contests").GetComponent <Contests>() .InitContests(mTitle, mContestEvent.Response.data); }
void ReceivedProfile() { UtilMgr.AddBackState(UtilMgr.STATE.Profile); transform.FindChild("Profile").FindChild("BtnBGBack").GetComponent <UIButton>().defaultColor = new Color(0, 0, 0, 200f / 255f); transform.FindChild("Profile").FindChild("BtnBGBack").GetComponent <UIButton>().hover = new Color(0, 0, 0, 200f / 255f); transform.FindChild("Profile").FindChild("BtnBGBack").GetComponent <UIButton>().pressed = new Color(0, 0, 0, 200f / 255f); transform.FindChild("Profile").gameObject.SetActive(true); transform.FindChild("Profile").localPosition = new Vector3(720f, 0, 0); TweenPosition.Begin(transform.FindChild("Profile").gameObject, 0.5f, new Vector3(132f, 0, 0), false); transform.FindChild("Profile").GetComponent <UITweener>().method = UITweener.Method.EaseOut; transform.FindChild("Profile").GetComponent <Profile>().Init(mProfileEvent); }
void ReceivedGold() { UtilMgr.RemoveBackState(UtilMgr.STATE.Profile); if (UtilMgr.GetLastBackState() != UtilMgr.STATE.Shop) { UtilMgr.AnimatePageToLeft(UtilMgr.GetLastBackState().ToString(), "Shop"); UtilMgr.AddBackState(UtilMgr.STATE.Shop); } transform.root.FindChild("Shop").GetComponent <Shop>().InitGoldShop( UtilMgr.GetLocalText("StrGoldShop"), Shop.GOLD, mGoldEvent); }
void ReceivedLineup() { transform.FindChild("Top").FindChild("LblMyLineup").GetComponent <UILabel>().text = UtilMgr.GetLocalText("LblMyLineup") + " [00a0e9][" + mLineupEvent.Response.data.Count + "/50]"; UtilMgr.ClearList(transform.FindChild("Body").FindChild("Draggable")); transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>() .Init(mLineupEvent.Response.data.Count, delegate(UIListItem item, int index) { InitItem(item, index); }); transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>().ResetPosition(); UtilMgr.AddBackState(UtilMgr.STATE.Lineup); UtilMgr.AnimatePageToLeft("RegisterEntry", "Lineup"); }
IEnumerator Next() { transform.FindChild("Top").gameObject.SetActive(false); transform.FindChild("Body").gameObject.SetActive(false); yield return(new WaitForSeconds(0.1f)); transform.FindChild("Top").gameObject.SetActive(true); transform.FindChild("Body").gameObject.SetActive(true); UtilMgr.AddBackState(UtilMgr.STATE.LiveBingo); UtilMgr.AnimatePageToLeft("Lobby", "LiveBingo"); // if(UserMgr.eventJoined.status.Equals("Final")){ // ShowGameEnded(); // } }
public void Init() { transform.localPosition = new Vector3(2000f, 0); transform.gameObject.SetActive(true); Reset(); transform.FindChild("Body").FindChild("Scroll View").GetComponent <UIScrollView>().ResetPosition(); UtilMgr.RemoveBackState(UtilMgr.STATE.Profile); UtilMgr.AnimatePageToLeft(UtilMgr.GetLastBackState().ToString(), "Settings"); UtilMgr.AddBackState(UtilMgr.STATE.Settings); // UtilMgr.AnimatePageToLeft(UtilMgr. }
public void OnBtnRightClick() { if (mCardInfo.useYn > 0) { DialogueMgr.ShowDialogue("InUse", "InUse", DialogueMgr.DIALOGUE_TYPE.Alert, null); return; } else if ((mCardInfo.cardClass >= CardInfo.CLASS_MAX) && (mCardInfo.cardLevel >= CardInfo.LEVEL_MAX)) { return; } else if (mCardInfo.cardLevel > 4) { if (UtilMgr.IsMLB()) { transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>() .Init(mCardInfo, transform.FindChild("MLB").FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture") .GetComponent <UITexture>().mainTexture, UtilMgr.GetLocalText("LblCardRankUp"), CardPowerUp.TYPE.RANKUP); } else { transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>() .Init(mCardInfo, transform.FindChild("KBO").FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture") .GetComponent <UITexture>().mainTexture, UtilMgr.GetLocalText("LblCardRankUp"), CardPowerUp.TYPE.RANKUP); } } else { if (UtilMgr.IsMLB()) { transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>() .Init(mCardInfo, transform.FindChild("MLB").FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture") .GetComponent <UITexture>().mainTexture, UtilMgr.GetLocalText("LblCardPowerUp"), CardPowerUp.TYPE.LEVELUP); } else { transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>() .Init(mCardInfo, transform.FindChild("KBO").FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture") .GetComponent <UITexture>().mainTexture, UtilMgr.GetLocalText("LblCardPowerUp"), CardPowerUp.TYPE.LEVELUP); } } UtilMgr.AddBackState(UtilMgr.STATE.CardPowerUp); UtilMgr.AnimatePageToLeft("MyCards", "CardPowerUp"); }
public void OnClick() { if (mContestInfo.entryTicket > UserMgr.UserInfo.ticket) { UtilMgr.NotEnoughTicket(); return; } if (mContestInfo.myEntry > 0) { mLineupEvent = new GetMyLineupEvent(ReceivedEntry); NetMgr.GetMyEntryData(mContestInfo.myEntry, mLineupEvent); return; } UtilMgr.AddBackState(UtilMgr.STATE.RegisterEntry); UtilMgr.AnimatePageToLeft("Contests", "RegisterEntry"); transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().InitRegisterEntry(mContestInfo); }
public void OnClick() { if (name.Equals("BtnRight")) { UtilMgr.AddBackState(UtilMgr.STATE.SelectPlayer); UtilMgr.AnimatePageToLeft("RegisterEntry", "SelectPlayer"); transform.root.FindChild("SelectPlayer").GetComponent <SelectPlayer>() .Init(int.Parse(transform.parent.parent.FindChild("Label").GetComponent <UILabel>().text)); } else { if (transform.parent.FindChild("Designated").gameObject.activeSelf && transform.parent.GetComponent <ItemPosition>().mPlayerInfo != null) { transform.root.FindChild("PlayerCard").GetComponent <PlayerCard>().Init( transform.parent.GetComponent <ItemPosition>().mPlayerInfo, transform.GetComponent <UITexture>().mainTexture); } } }
EventDelegate delegateAppearBackFinish; // = new EventDelegate(AppearBackFinish); public void AppearBack() { delegateAppearBackFinish = new EventDelegate(AppearBackFinish); // Debug.Log("1"); UtilMgr.AddBackState(UtilMgr.STATE.PlayerCard); transform.gameObject.SetActive(true); transform.FindChild("Back").gameObject.SetActive(true); transform.FindChild("PackBack").gameObject.SetActive(false); // transform.FindChild("BG").GetComponent<UISprite>().color = new Color(0, 0, 0, 200f/255f); TweenAlpha.Begin(transform.FindChild("BG").gameObject, 0, 200f / 255f); SetCardBack(); transform.FindChild("Back").localScale = new Vector3(0f, 0f, 1f); transform.localPosition = Vector3.zero; transform.FindChild("Body").localScale = new Vector3(0, 1f, 1f); TweenScale.Begin(transform.FindChild("Back").gameObject, 0.3f, new Vector3(1f, 1f, 1f)); CanOpen = false; transform.FindChild("Back").GetComponent <TweenScale>().SetOnFinished(delegateAppearBackFinish); }
void ReceivedSkill() { transform.gameObject.SetActive(true); mList = new List <SkillsetInfo>(); foreach (SkillsetInfo skill in mSkillEvent.Response.data) { if (skill.dockingYn == 0) { mList.Add(skill); } } transform.FindChild("Top").FindChild("Skills").FindChild("LblSkillsV").GetComponent <UILabel>().text = mList.Count + " / " + UserMgr.LobbyInfo.userInvenOfSkill; transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>().RemoveAll(); transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>().Init( mList.Count, delegate(UIListItem item, int index) { SkillsetInfo info = mList[index]; item.Target.transform.GetComponent <ItemSkill>().Init(info); if (mCardInfo == null) { item.Target.transform.FindChild("BtnRight").gameObject.SetActive(false); } else { item.Target.transform.FindChild("BtnRight").gameObject.SetActive(true); } }); transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>().ResetPosition(); if (UtilMgr.GetLastBackState() != UtilMgr.STATE.SkillList) { UtilMgr.AddBackState(UtilMgr.STATE.SkillList); UtilMgr.AnimatePageToLeft("MyCards", "SkillList"); } }
public void AppearPack(string productCode) { SetRenderQ(); UtilMgr.AddBackState(UtilMgr.STATE.PlayerCard); transform.gameObject.SetActive(true); transform.FindChild("PackBack").gameObject.SetActive(true); transform.FindChild("PackBack").localPosition = Vector3.zero; string strImg = ""; if (productCode.Equals("item.2120213001")) { strImg = "images/shop_card_pack_bronze"; } else if (productCode.Equals("item.2120214001")) { strImg = "images/shop_card_pack_silver"; } else if (productCode.Equals("item.2120225001")) { strImg = "images/shop_card_pack_gold"; } else { strImg = "images/shop_card_pack_vip"; } transform.FindChild("PackBack").FindChild("Texture").GetComponent <UITexture>() .mainTexture = Resources.Load <Texture2D>(strImg); transform.FindChild("PackBack").localScale = new Vector3(1f, 1f, 1f); transform.localPosition = Vector3.zero; transform.FindChild("Body").localScale = new Vector3(0, 1f, 1f); StartCoroutine(WaitForLighting()); }
void ReceivedCard() { UserMgr.CardList = mCardEvent.Response.data; UtilMgr.ClearList(transform.FindChild("Body").FindChild("Draggable")); if (mSortedList != null) { mSortedList.Clear(); } mSortedList = new List <CardInfo>(); if (transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>().mType == CardPowerUp.TYPE.LEVELUP) { foreach (CardInfo info in mCardEvent.Response.data) { if (info.itemSeq == mTargetCard.itemSeq) { continue; } else if (info.useYn > 0) { continue; } mSortedList.Add(info); } } else { foreach (CardInfo info in mCardEvent.Response.data) { if (info.itemSeq == mTargetCard.itemSeq) { continue; } else if (info.useYn > 0) { continue; } else if (info.cardClass != mTargetCard.cardClass) { continue; } else if (info.cardLevel < 5) { continue; } mSortedList.Add(info); } } transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>() .Init(mSortedList.Count, delegate(UIListItem item, int index){ InitInvenItem(item, index); }); transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>().ResetPosition(); if (transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>().mType == CardPowerUp.TYPE.LEVELUP) { transform.FindChild("Top").FindChild("LblSelected").FindChild("Label") .GetComponent <UILabel>().text = transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>().mCardFeedList.Count + "/4"; } else { transform.FindChild("Top").FindChild("LblSelected").FindChild("Label") .GetComponent <UILabel>().text = transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>().mCardFeedList.Count + "/1"; } UtilMgr.AddBackState(UtilMgr.STATE.SelectFeeding); UtilMgr.AnimatePageToLeft("CardPowerUp", "SelectFeeding"); }
void InitEnded() { UtilMgr.AddBackState(UtilMgr.STATE.MyContests); UtilMgr.AnimatePageToLeft("Lobby", "MyContests"); }
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"); }