Beispiel #1
0
    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 InitEntries()
    {
        Transform tf = transform.FindChild("Changeables").FindChild("Entries");

        tf.gameObject.SetActive(true);
        UtilMgr.ClearList(tf.FindChild("Draggable"));
        tf.FindChild("Draggable").GetComponent <UIDraggablePanel2>().Init(mEntryEvent.Response.data.Count,
                                                                          delegate(UIListItem item, int index) {
            item.Target.transform.FindChild("SprRankbox").FindChild("Label").GetComponent <UILabel>()
            .text = mEntryEvent.Response.data[index].rank + "";
            item.Target.transform.FindChild("LblName").GetComponent <UILabel>().text
                = mEntryEvent.Response.data[index].name;
            item.Target.transform.FindChild("LblPtLeft").GetComponent <UILabel>().text
                = mEntryEvent.Response.data[index].fantasyPoint + "";

            float ratio = mEntryEvent.Response.data[index].gameOverPlayers / 9f;
            int width   = (int)(152 * ratio);
            item.Target.transform.FindChild("Panel").FindChild("SprGaugeFront").GetComponent <UISprite>()
            .width = width;
            item.Target.transform.FindChild("Panel").FindChild("SprGaugeFront").localPosition
                = new Vector3(-((152 - width) / 2), 0);

            item.Target.transform.FindChild("SprPhotoBG")
            .FindChild("Photo").FindChild("Texture").GetComponent <UITexture>().mainTexture =
                UtilMgr.GetTextureDefault();

            UtilMgr.LoadUserImage(mEntryEvent.Response.data[index].photoUrl,
                                  item.Target.transform.FindChild("SprPhotoBG")
                                  .FindChild("Photo").FindChild("Texture").GetComponent <UITexture>());
        });
        tf.FindChild("Draggable").GetComponent <UIDraggablePanel2>().ResetPosition();
    }
Beispiel #3
0
    void InitFeedsToBlank(int i)
    {
        Transform tf = transform.FindChild("Body").FindChild("Scroll").FindChild("ItemCardPowerUp");

        tf.FindChild("FeedingCardPowerUp").FindChild("PowerUp").FindChild("" + (i + 1)).
        FindChild("FG").gameObject.SetActive(false);
        tf.FindChild("FeedingCardPowerUp").FindChild("PowerUp").FindChild("" + (i + 1)).
        FindChild("Star").gameObject.SetActive(false);
        tf.FindChild("FeedingCardPowerUp").FindChild("PowerUp").FindChild("" + (i + 1)).
        FindChild("LvlLv").gameObject.SetActive(false);
        tf.FindChild("FeedingCardPowerUp").FindChild("PowerUp").FindChild("" + (i + 1)).
        FindChild("Panel2").FindChild("Button").gameObject.SetActive(true);
        tf.FindChild("FeedingCardPowerUp").FindChild("PowerUp").FindChild("" + (i + 1)).
        FindChild("Panel").FindChild("Photo").GetComponent <UITexture>().mainTexture
            = UtilMgr.GetTextureDefault();
        tf.FindChild("FeedingCardPowerUp").FindChild("PowerUp").FindChild("" + (i + 1)).
        FindChild("Panel").FindChild("Photo").GetComponent <UITexture>().color
            = new Color(1f, 1f, 1f, 50f / 255f);
        tf.FindChild("FeedingCardPowerUp").FindChild("PowerUp").FindChild("" + (i + 1)).
        FindChild("Panel").FindChild("Sprite").GetComponent <UISprite>().color
            = new Color(102f / 255f, 102f / 255f, 102f / 255f);
    }
Beispiel #4
0
//	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();
        }
    }
    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>());
        }
    }
Beispiel #6
0
    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();
    }
    void InitInvenItem(UIListItem item, int index)
    {
        CardInfo info = mSortedList[index];

        item.Target.transform.FindChild("ItemCard").FindChild("BtnRight").GetComponent <BtnSelectFeeding>().mCardInfo  = info;
        item.Target.transform.FindChild("ItemCard").FindChild("BtnRight").GetComponent <BtnSelectFeeding>().IsSelected = false;

        if (transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>().mCardFeedList != null)
        {
            foreach (CardInfo feedInfo in transform.root.FindChild("CardPowerUp").GetComponent <CardPowerUp>().mCardFeedList)
            {
                if (feedInfo.itemSeq == info.itemSeq)
                {
                    item.Target.transform.FindChild("ItemCard").FindChild("BtnRight").GetComponent <BtnSelectFeeding>().IsSelected = true;
                    break;
                }
            }
        }

        Transform tf = item.Target.transform.FindChild("ItemCard");

        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("LblPosition").GetComponent <UILabel>().text = info.position;

        tf.FindChild("LblSalary").GetComponent <UILabel>().text = "$" + info.salary;
        tf.FindChild("Star").FindChild("StarV").GetComponent <UILabel>().text = info.cardClass + "";
        tf.FindChild("Star").FindChild("StarV").localPosition = new Vector3(20f + (18f * (info.cardClass - 1)), -4f);
        for (int i = 1; i <= 6; i++)
        {
            tf.FindChild("Star").FindChild("SprStar" + i).gameObject.SetActive(false);
        }
        for (int i = 1; i <= info.cardClass; i++)
        {
            tf.FindChild("Star").FindChild("SprStar" + i).gameObject.SetActive(true);
            string starStr = "star_bronze";
            if (info.cardClass > 4)
            {
                starStr = "star_gold";
            }
            else if (info.cardClass > 2)
            {
                starStr = "star_silver";
            }
            tf.FindChild("Star").FindChild("SprStar" + i).GetComponent <UISprite>().spriteName = starStr;
        }

        tf.FindChild("Level").localPosition = new Vector3(-124f + (18f * (info.cardClass - 1)), -40f);
        tf.FindChild("Level").FindChild("LblLevel").FindChild("LevelV").GetComponent <UILabel>().text = info.cardLevel + "";
        tf.FindChild("LblFPPG").FindChild("LblFPPGV").GetComponent <UILabel>().text   = info.fppg;
        tf.FindChild("LblSkill").FindChild("LblSkillV").GetComponent <UILabel>().text = "1";
        if (info.useYn > 0)
        {
            tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Inuse").gameObject.SetActive(true);
            tf.FindChild("BtnPhoto").FindChild("Panel").GetComponent <UIPanel>().baseClipRegion
                = new Vector4(0, 0, 156f, 130f);
        }
        else
        {
            tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Inuse").gameObject.SetActive(false);
            tf.FindChild("BtnPhoto").FindChild("Panel").GetComponent <UIPanel>().baseClipRegion
                = new Vector4(0, 0, 152f, 108f);
        }
        if ((info.injuryYN != null) && (info.injuryYN.Equals("Y")))
        {
            tf.FindChild("BtnPhoto").FindChild("SprInjury").gameObject.SetActive(true);
        }
        else
        {
            tf.FindChild("BtnPhoto").FindChild("SprInjury").gameObject.SetActive(false);
        }

        tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().mainTexture
            = UtilMgr.GetTextureDefault();

        tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().color
            = new Color(1f, 1f, 1f, 50f / 255f);

        UtilMgr.LoadImage(info.playerFK,
                          tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>());
    }
Beispiel #8
0
    void draw_TopPlayer_post()
    {
        List <PlayerInfo> mSortedList0 = new List <PlayerInfo>();

        foreach (PlayerInfo info in UserMgr.PlayerList)
        {
            //if(info.positionNo == 1) mSortedList.Add(info);		//del
            mSortedList0.Add(info);                                                     // all
        }
        mSortedList0.Sort(delegate(PlayerInfo x, PlayerInfo y) {                        // sort
            return(y.fppg.CompareTo(x.fppg));
        });

        mSortedList = new List <PlayerInfo>();
        for (int i = 0; i < 10; i++)
        {
            mSortedList.Add(mSortedList0[i]);
        }



        //for(int i=0;i<mSortedList.Count;i++) Com.LOOG(i, mSortedList[i].korName, mSortedList[i].fppg);	//debug

        UIDraggablePanel2 drag = Com.FindTransform(transform, "Top_Players", "ScrollBody").GetComponent <UIDraggablePanel2>();

        drag.SetDragAmount(0, 30f, false);
        drag.RemoveAll();
        drag.Init(
            mSortedList.Count, delegate(UIListItem item, int index) {
            UILabel name = Com.Find_UILabel(item.Target.transform, "MLB", "name");
            name.text    = Localization.language.Equals("English")
                                        ? mSortedList[index].firstName.Substring(0, 1) + ". " + mSortedList[index].lastName
                                        : mSortedList[index].korName;

            UITexture tex = Com.FindTransform(item.Target.transform, "MLB", "BtnPhoto", "Texture").GetComponent <UITexture>();
            //tex.color = new Color(1f, 1f, 1f, 50f/255f);
            bool ispic = UtilMgr.LoadImage(mSortedList[index].playerId, tex);
            if (ispic == false)
            {
                tex.mainTexture = UtilMgr.GetTextureDefault();
            }



            UILabel rank = Com.Find_UILabel(item.Target.transform, "ranking_num", "Label");
            if (index < 3)
            {
                rank.transform.parent.gameObject.SetActive(true);
                rank.text = (index + 1) + "";

                if (index == 0)
                {
                    rank.transform.parent.GetComponent <UISprite>().color = Com.GetColor(0xceab2a);
                }
                else if (index == 1)
                {
                    rank.transform.parent.GetComponent <UISprite>().color = Com.GetColor(0x9c9d9f);
                }
                else if (index == 2)
                {
                    rank.transform.parent.GetComponent <UISprite>().color = Com.GetColor(0x935e44);
                }
            }
            else
            {
                rank.transform.parent.gameObject.SetActive(false);
            }

            UILabel fppg = Com.Find_UILabel(item.Target.transform, "FPPG_num");
            fppg.text    = mSortedList[index].fppg.ToString("f1");

            UILabel position = Com.Find_UILabel(item.Target.transform, "position", "Label");
            position.text    = mSortedList[index].position;



            // draw own
            {
                Transform own = Com.FindTransform(item.Target.transform, "own");
                own.gameObject.SetActive(false);
                for (int i = 0; i < UserMgr.CardList.Count; i++)
                {
                    if (UserMgr.CardList[i].playerFK == mSortedList[index].playerId)
                    {
                        own.gameObject.SetActive(true);
                        Com.LOOG("own", UserMgr.CardList[i].korName, UserMgr.CardList[i].fppg, mSortedList[index].fppg);
                        break;
                    }
                }
            }

            Com.FindTransform(item.Target.transform, "BtnPhoto").GetComponent <TopCard>().mPlayerInfo = mSortedList[index];
        });


        drag.ResetPosition();
        drag.GetComponent <SpringPanel>().target  = new Vector3(0, -85, 0);
        drag.GetComponent <SpringPanel>().enabled = true;
    }
Beispiel #9
0
    void InitInvenItem(UIListItem item, int index)
    {
        CardInfo info = mList[index];

        item.Target.GetComponent <ItemInvenCard>().mCardInfo = info;

        if (info.mType == CardInfo.INVEN_TYPE.CARD)
        {
            item.Target.transform.FindChild("ItemCardPack").gameObject.SetActive(false);
            item.Target.transform.FindChild("ItemCard").gameObject.SetActive(true);
            item.Target.transform.FindChild("ItemExpand").gameObject.SetActive(false);

            Transform tf = item.Target.transform.FindChild("ItemCard");

            tf.GetComponent <ItemCard>().mCardInfo = 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;
                }
                if (info.teamName.Length < 1)
                {
                    tf.FindChild("LblTeam").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrInactive");
                }
                else
                {
                    tf.FindChild("LblTeam").GetComponent <UILabel>().text = info.city + " " + info.teamName;
                }
            }
            else
            {
                tf.FindChild("LblName").GetComponent <UILabel>().text = info.korName;
                if (info.teamName.Length < 1)
                {
                    tf.FindChild("LblTeam").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrInactive");
                }
                else
                {
                    tf.FindChild("LblTeam").GetComponent <UILabel>().text = info.korTeamName;
                }
            }



            tf.FindChild("LblSalary").GetComponent <UILabel>().text = "$" + info.salary;
            tf.FindChild("Star").FindChild("StarV").GetComponent <UILabel>().text = info.cardClass + "";
            tf.FindChild("Star").FindChild("StarV").localPosition = new Vector3(20f + (18f * (info.cardClass - 1)), -4f);
            for (int i = 1; i <= 6; i++)
            {
                tf.FindChild("Star").FindChild("SprStar" + i).gameObject.SetActive(false);
            }
            for (int i = 1; i <= info.cardClass; i++)
            {
                tf.FindChild("Star").FindChild("SprStar" + i).gameObject.SetActive(true);
                string starStr = "star_bronze";
                if (info.cardClass > 4)
                {
                    starStr = "star_gold";
                }
                else if (info.cardClass > 2)
                {
                    starStr = "star_silver";
                }
                tf.FindChild("Star").FindChild("SprStar" + i).GetComponent <UISprite>().spriteName = starStr;
            }

            tf.FindChild("Level").localPosition = new Vector3(-124f + (18f * (info.cardClass - 1)), -40f);
            tf.FindChild("Level").FindChild("LblLevel").FindChild("LevelV").GetComponent <UILabel>().text = info.cardLevel + "";
            tf.FindChild("LblFPPG").FindChild("LblFPPGV").GetComponent <UILabel>().text   = info.fppg;
            tf.FindChild("LblSkill").FindChild("LblSkillV").GetComponent <UILabel>().text = "1";
//			if(UtilMgr.IsMLB()){
//				tf.FindChild("MLB").gameObject.SetActive(true);
//				tf.FindChild("KBO").gameObject.SetActive(false);
//
//				tf = item.Target.transform.FindChild("ItemCard").FindChild("MLB");
//
//				if((info.injuryYN != null) && (info.injuryYN.Equals("Y"))){
//					tf.FindChild("BtnPhoto").FindChild("SprInjury").gameObject.SetActive(true);
//				} else
//					tf.FindChild("BtnPhoto").FindChild("SprInjury").gameObject.SetActive(false);
//
//				if(info.useYn > 0){
//					tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Inuse").gameObject.SetActive(true);
//					tf.FindChild("BtnPhoto").FindChild("Panel").GetComponent<UIPanel>().baseClipRegion
//						= new Vector4(0, 0, 156f, 130f);
//				} else{
//					tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Inuse").gameObject.SetActive(false);
//					tf.FindChild("BtnPhoto").FindChild("Panel").GetComponent<UIPanel>().baseClipRegion
//						= new Vector4(0, 0, 152f, 108f);
//				}
//			} else{
            tf.FindChild("MLB").gameObject.SetActive(false);
            tf.FindChild("KBO").gameObject.SetActive(true);

            tf = item.Target.transform.FindChild("ItemCard").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);
            }

            tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Inuse").gameObject.SetActive(false);
            tf.FindChild("BtnPhoto").FindChild("Panel").GetComponent <UIPanel>().baseClipRegion
                = new Vector4(0, 0, 152f, 186f);

            if (info.useYn > 0)
            {
                tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Inuse").gameObject.SetActive(true);
                tf.FindChild("BtnPhoto").FindChild("Panel").GetComponent <UIPanel>().baseClipRegion
                    = new Vector4(0, 0, 156f, 130f);
            }
            else
            {
                tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Inuse").gameObject.SetActive(false);
                tf.FindChild("BtnPhoto").FindChild("Panel").GetComponent <UIPanel>().baseClipRegion
                    = new Vector4(0, 0, 152f, 108f);
            }
//			}



            tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().mainTexture
                = UtilMgr.GetTextureDefault();

            tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().color
                = new Color(1f, 1f, 1f, 50f / 255f);

            UtilMgr.LoadImage(info.playerFK,
                              tf.FindChild("BtnPhoto").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>());
        }
        else if (info.mType == CardInfo.INVEN_TYPE.PACK)
        {
            item.Target.transform.FindChild("ItemCardPack").gameObject.SetActive(true);
            item.Target.transform.FindChild("ItemCard").gameObject.SetActive(false);
            item.Target.transform.FindChild("ItemExpand").gameObject.SetActive(false);

            item.Target.transform.FindChild("ItemCardPack").FindChild("LblName").GetComponent <UILabel>().text
                = item.Target.GetComponent <ItemInvenCard>().mCardInfo.mMailinfo.mail_title;
            item.Target.transform.FindChild("ItemCardPack").FindChild("LblDesc").GetComponent <UILabel>().text
                = item.Target.GetComponent <ItemInvenCard>().mCardInfo.mMailinfo.mail_desc;
        }
        else if (info.mType == CardInfo.INVEN_TYPE.EXPAND)
        {
            item.Target.transform.FindChild("ItemCardPack").gameObject.SetActive(false);
            item.Target.transform.FindChild("ItemCard").gameObject.SetActive(false);
            item.Target.transform.FindChild("ItemExpand").gameObject.SetActive(true);
            item.Target.transform.FindChild("ItemExpand").FindChild("LblMoreCards1").GetComponent <UILabel>()
            .text = string.Format(UtilMgr.GetLocalText("LblMoreCards1"),
                                  mCardEvent.Response.data.Count - UserMgr.LobbyInfo.userInvenOfCard - 1);
        }
    }