コード例 #1
0
    void setposition()
    {
        posisions = bars.transform.GetChild(0).transform.localPosition;
        for (int i = 0; i < bars.transform.childCount; i++)
        {
            bars.transform.GetChild(i).transform.localPosition = new Vector3(posisions.x, posisions.y - (i * gap), posisions.z);
            bars.transform.GetChild(i).GetChild(0).GetComponent <UILabel>().text = rank[i];
            bars.transform.GetChild(i).GetChild(1).GetComponent <UILabel>().text = teamname[i];
            bars.transform.GetChild(i).GetChild(2).GetComponent <UILabel>().text = v[i];
            bars.transform.GetChild(i).GetChild(3).GetComponent <UILabel>().text = l[i];
            bars.transform.GetChild(i).GetChild(4).GetComponent <UILabel>().text = d[i];

            bars.transform.GetChild(i).GetChild(5).GetComponent <UILabel>().text = behind[i];
            if (rankDiff[i] != null && rankDiff[i].Length > 0)
            {
                bars.transform.GetChild(i).GetChild(5).GetComponent <UILabel>().text = rankDiff[i];
            }


            string imgName = UtilMgr.GetTeamEmblem(image[i]);
            bars.transform.GetChild(i).GetChild(6).GetComponent <UISprite>().spriteName = imgName;
            rankswitch(i);
//			bars.transform.GetChild(i).GetChild(8).GetComponent<UILabel>().text = Seq[i];
        }
        gameObject.transform.FindChild("Scroll View").gameObject.SetActive(true);

        transform.FindChild("Scroll View").GetComponent <UIScrollView> ().ResetPosition();
    }
コード例 #2
0
    public void Init(ScheduleInfo schedule, int index)
    {
        mSchedule = schedule;
        mIndex    = index;
        ActiveAllBtns();

        UILabel  lblDetail    = mLblDetail.GetComponent <UILabel> ();
        UILabel  lblLeftTeam  = mLblLeftTeam.GetComponent <UILabel> ();
        UILabel  lblRightTeam = mLblRightTeam.GetComponent <UILabel> ();
        UILabel  lblScore     = mLblScore.GetComponent <UILabel> ();
        UISprite sprLeftTeam  = mSprLeftTeam.GetComponent <UISprite> ();
        UISprite sprRightTeam = mSprRightTeam.GetComponent <UISprite> ();

        lblDetail.text          = UtilMgr.ConvertToDate(schedule.startTime);
        lblLeftTeam.text        = schedule.extend [0].teamName;
        lblRightTeam.text       = schedule.extend [1].teamName;
        lblScore.text           = schedule.extend [0].score + " : " + schedule.extend [1].score;
        sprLeftTeam.spriteName  = UtilMgr.GetTeamEmblem(schedule.extend [0].imageName);
        sprRightTeam.spriteName = UtilMgr.GetTeamEmblem(schedule.extend [1].imageName);

        //temp
        if (schedule.gameStatus == 0)
        {
        }
        else if (schedule.gameStatus == 1)
        {
            mBGMatch.GetComponent <UISprite>().color = new Color(0f, 1f, 0f, 0.5f);
        }
        else
        {
            mBGMatch.GetComponent <UISprite>().color = new Color(0f, 0f, 1f, 0.5f);
        }
    }
コード例 #3
0
 void InitCard()
 {
     mBG.GetComponent <UISprite>().spriteName   = IMAGE_CARDS[mCardInfo.classNo - 1];
     mNumber.GetComponent <UILabel>().text      = mCardInfo.backNum + "";
     mName.GetComponent <UILabel>().text        = mCardInfo.cardName;
     mTeam.GetComponent <UISprite>().spriteName = UtilMgr.GetTeamEmblem(mCardInfo.teamCode);
     mRatio.GetComponent <UILabel>().text       = mCardInfo.rewardRate + "";
     string path = Constants.IMAGE_SERVER_HOST + mCardInfo.cardImagePath + mCardInfo.cardImageName;
     WWW    www  = new WWW(path);
     //StartCoroutine(GetFace(www));
 }
コード例 #4
0
    void Setting()
    {
        UserImagePath = mProfileEvent.Response.data.imagePath;
        UserImageName = mProfileEvent.Response.data.imageName;
        UserName      = mProfileEvent.Response.data.memberName;
        //Debug.Log ("UserName : "******"GetTeamCode : " + mProfileEvent.Response.data.GetTeamCode());
        UserTeamFullName = mProfileEvent.Response.data.GetTeamFullName();
        //Debug.Log ("UserTeamFullName : " + mProfileEvent.Response.data.GetTeamFullName ());
        string imgName = UtilMgr.GetTeamEmblem(UserTeamCode);

        UserTeamCode = imgName;

        //Debug.Log ("UserMgr.UserInfo.teamCode be : " + UserMgr.UserInfo.GetTeamCode());
        LeftUserName.text                    = UserName;
        LeftTeamName.text                    = mProfileEvent.Response.data.GetTeamName();
        UserMgr.UserInfo.memberName          = UserName;
        UserMgr.UserInfo.memberEmail         = UserEmail;
        UserMgr.UserInfo.favoBB.teamCode     = mProfileEvent.Response.data.GetTeamCode();
        UserMgr.UserInfo.favoBB.teamFullName = mProfileEvent.Response.data.GetTeamFullName();
        UserMgr.UserInfo.favoBB.teamName     = mProfileEvent.Response.data.GetTeamName();
        //	Debug.Log ("mProfileEvent.Response.data.GetTeamCode(): " + mProfileEvent.Response.data.GetTeamCode());
        //	Debug.Log ("UserMgr.UserInfo.teamCode af: " + UserMgr.UserInfo.GetTeamCode());
        SetName     = UserName;
        SetTeamCode = mProfileEvent.Response.data.GetTeamCode();

        string images = Constants.IMAGE_SERVER_HOST + UserImagePath + UserImageName;

        //Profile.transform.FindChild ("LblNick").GetComponent<UILabel> ().text = UserName;
        //Profile.transform.FindChild ("LblStatus").GetComponent<UILabel> ().text = UserState;
        //Profile.transform.FindChild ("SprEmblem").GetComponent<UISprite> ().spriteName = UserTeamCode;
        if (UserImageName != "")
        {
            WWW www = new WWW(images);
            StartCoroutine(GetImage(www));
        }
        else if (UserImageName == UserEmail || UserImageName == "")
        {
            Profile.transform.FindChild("Panel").FindChild("Photo").GetComponent <UITexture> ().mainTexture = Default;
        }

        //if (UserImageName != "") {
        Profile.transform.FindChild("LblNick").GetComponent <UILabel> ().text          = UserName;
        Profile.transform.FindChild("LblStatus").GetComponent <UILabel> ().text        = UserState;
        Profile.transform.FindChild("SprEmblem").GetComponent <UISprite> ().spriteName = UserTeamCode;
        //}
    }
コード例 #5
0
    public void SetVSInfo(ScheduleInfo scheduleInfo)
    {
//		mSchedule = scheduleInfo;
//
//		mState = STATE.VS;
//
//		transform.FindChild("VSInfo").gameObject.SetActive(true);
//
//		transform.FindChild("GoldInfo").gameObject.SetActive(false);
//		transform.FindChild("GroupInfo").gameObject.SetActive(false);
//		transform.FindChild("CardInfo").gameObject.SetActive(false);
//
//		Transform tfInfo = transform.FindChild("VSInfo");
//		tfInfo.FindChild("SprTeamLogo").GetComponent<UISprite>().spriteName =
//			UtilMgr.GetTeamEmblem(scheduleInfo.extend[0].imageName);
//		tfInfo.FindChild("LblScoreLeft").GetComponent<UILabel>().text = scheduleInfo.extend[0].score+"";
//		tfInfo.FindChild("SprVSLogo").GetComponent<UISprite>().spriteName =
//			UtilMgr.GetTeamEmblem(scheduleInfo.extend[1].imageName);
//		tfInfo.FindChild("LblScoreRight").GetComponent<UILabel>().text = scheduleInfo.extend[1].score+"";
//
//
//
//
//		if(scheduleInfo.gameStatus == ScheduleInfo.GAME_ENDED)
//			tfInfo.FindChild("LblInfo").GetComponent<UILabel>().text = mStrEnd;
//		else if(scheduleInfo.gameStatus == ScheduleInfo.GAME_PLAYING)
//			tfInfo.FindChild("LblInfo").GetComponent<UILabel>().text = mStrLive;
//		else if(scheduleInfo.gameStatus == ScheduleInfo.GAME_READY)
//			tfInfo.FindChild("LblInfo").GetComponent<UILabel>().text = mStrReady;
//
//


        Transform tfInfo = Ground.transform;

        //	Debug.Log ();
        if (scheduleInfo != null)
        {
            tfInfo.FindChild("LeftTeam").GetComponent <UISprite> ().spriteName =
                UtilMgr.GetTeamEmblem(scheduleInfo.extend [0].imageName);
            tfInfo.FindChild("LeftTeam").FindChild("Label").GetComponent <UILabel> ().text = scheduleInfo.extend [0].teamName;
            //tfInfo.FindChild("LblScoreLeft").GetComponent<UILabel>().text = scheduleInfo.extend[0].score+"";
            tfInfo.FindChild("RightTeam").GetComponent <UISprite> ().spriteName =
                UtilMgr.GetTeamEmblem(scheduleInfo.extend [1].imageName);
            tfInfo.FindChild("RightTeam").FindChild("Label").GetComponent <UILabel> ().text = scheduleInfo.extend [1].teamName;
            //tfInfo.FindChild("LblScoreRight").GetComponent<UILabel>().text = scheduleInfo.extend[1].score+"";
            tfInfo.FindChild("Score").GetComponent <UILabel> ().text = scheduleInfo.extend [0].score + ":" + scheduleInfo.extend [1].score;
        }
    }
コード例 #6
0
    // Use this for initialization
    void Start()
    {
//		mSchedule.SetActive (true);
//
//		mRanking.SetActive (false);
//		mLeague.SetActive (false);
//		mStatistics.SetActive (false);
        //mScheduleEvent = new GetScheduleEvent (new EventDelegate ("OpenSchedule"));
        //NetMgr.GetScheduleAll (mScheduleEvent);

//		OpenSchedule ();
        CheckFirst();

        mEmblem.GetComponent <UISprite>().spriteName =
            UtilMgr.GetTeamEmblem(UserMgr.UserInfo.GetTeamCode());
    }
コード例 #7
0
    void setposition()
    {
        News.Clear();
        D = transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).gameObject;

        for (int i = 0; i < Count.Count; i++)
        {
            //Debug.Log("iiiiiiii");

            NEW = (GameObject)Instantiate(D, new Vector2(0, 0), D.transform.localRotation);

            NEW.transform.parent = D.transform.parent;

            NEW.transform.localScale    = new Vector3(1, 1, 1);
            NEW.transform.localPosition = new Vector2(D.transform.localPosition.x, D.transform.localPosition.y - (gap * (i)));

            NEW.name = "Game" + (i + 1).ToString();
            string imgName = UtilMgr.GetTeamEmblem(LImage[Count[i]]);
            NEW.transform.GetChild(0).GetComponent <UISprite> ().spriteName = imgName;
            imgName = UtilMgr.GetTeamEmblem(RImage[Count[i]]);
            NEW.transform.GetChild(1).GetComponent <UISprite> ().spriteName = imgName;
            NEW.transform.GetChild(2).GetComponent <UILabel> ().text        = interActive [Count[i]];
            NEW.transform.GetChild(4).GetComponent <UILabel> ().text        = Score [Count[i]];
            NEW.transform.GetChild(5).GetComponent <UILabel> ().text        = Code [Count[i]];
            NEW.transform.GetChild(6).GetComponent <UILabel> ().text        = Statue [Count[i]];
            //NEW.transform.GetChild(2).GetChild(0).GetComponent<UILabel>().text = "19:34";
            NEW.gameObject.SetActive(true);
            if (int.Parse(myentry[Count[i]]) > 0)
            {
                NEW.transform.FindChild("YellowBG").gameObject.SetActive(true);
                if (Application.loadedLevelName.Equals("SceneMain"))
                {
                    NEW.transform.FindChild("myEntryFee").GetComponent <UILabel> ().text = myentry[Count[i]];
                }
            }
            else
            {
                NEW.transform.FindChild("YellowBG").gameObject.SetActive(false);
            }
            NEW.transform.FindChild("GameSeq").GetComponent <UILabel> ().text = gameseq [Count[i]];
            //Debug.Log(NEW);
            //Debug.Log(NEW.transform.parent);
            News.Add(NEW);
            transform.FindChild("BtnRight").FindChild("Scroll").GetComponent <UIScrollView>().ResetPosition();
        }
        Starts = false;
    }
コード例 #8
0
    public void SetGroupInfo()
    {
        mState = STATE.GROUP;

        transform.FindChild("GroupInfo").gameObject.SetActive(true);

        transform.FindChild("GoldInfo").gameObject.SetActive(false);
        transform.FindChild("VSInfo").gameObject.SetActive(false);
        transform.FindChild("CardInfo").gameObject.SetActive(false);

        Transform tfInfo = transform.FindChild("GroupInfo");

        Debug.Log("Teamcode is " + UserMgr.UserInfo.GetTeamCode());
        //		Debug.Log("emblem is "+)
        tfInfo.FindChild("SprTeamLogo").GetComponent <UISprite>().spriteName =
            UtilMgr.GetTeamEmblem(UserMgr.UserInfo.GetTeamCode());
        tfInfo.FindChild("LblTitle").GetComponent <UILabel>().text =
            UserMgr.UserInfo.GetTeamFullName();
        tfInfo.FindChild("SprVSLogo").GetComponent <UISprite>().spriteName =
            UtilMgr.GetTeamEmblem("");
        tfInfo.FindChild("LblInfo").GetComponent <UILabel>().text = mStrDefault;
    }
コード例 #9
0
    public void SetMemberTeam(string Team, string FullName)
    {
        Sett = true;
        //Debug.Log ("Team : "+Team);
        bool B = SettingPage.activeSelf;

        if (!SettingPage.activeSelf)
        {
            SettingPage.SetActive(true);
        }

        string imgName = UtilMgr.GetTeamEmblem(Team);

        SetTeamCode = Team;


        SettingPage.transform.FindChild("Bg_g").FindChild("Bg_w").FindChild("var2").FindChild("team").FindChild("img").GetComponent <UISprite> ().spriteName = imgName;

        //Set
        SettingPage.transform.FindChild("Bg_g").FindChild("Bg_w").FindChild("var2").FindChild("team").FindChild("team name").GetComponent <UILabel> ().text = FullName;
        //Set

        SettingPage.SetActive(B);
    }
コード例 #10
0
    void GotCardsInven()
    {
        needuppoint.Clear();
        grade.Clear();
        maxlv.Clear();
        posi.Clear();
        team.Clear();
        //num.Clear ();
        name.Clear();
        nowlv.Clear();
        add.Clear();
        hp.Clear();
        maxhp.Clear();
        exp.Clear();
        maxexp.Clear();
        cardgrade.Clear();
        teamimage.Clear();
        image.Clear();
        number.Clear();
        cards.Clear();
        backnum.Clear();
        for (int i = 0; i < mEvent.Response.data.hitter.Count; i++)
        {
            grade.Add(mEvent.Response.data.hitter [i].className);
            maxlv.Add(mEvent.Response.data.hitter [i].maxLevel.ToString());
            posi.Add(mEvent.Response.data.hitter [i].className.ToString());
            team.Add(mEvent.Response.data.hitter [i].teamName);
            //num.Add(mEvent.Response.data.hitter [i].cardNo.ToString());
            name.Add(mEvent.Response.data.hitter [i].cardName);
            nowlv.Add(mEvent.Response.data.hitter [i].cardLevel.ToString());
            add.Add(mEvent.Response.data.hitter [i].rewardRate.ToString());
            backnum.Add(mEvent.Response.data.hitter [i].backNum.ToString());
            hp.Add(nowhp(mEvent.Response.data.hitter [i].classNo, i));
            maxhp.Add(maxhps(mEvent.Response.data.hitter [i].classNo));

            exp.Add(mEvent.Response.data.hitter [i].cardXp);
            maxexp.Add(mEvent.Response.data.hitter [i].maxCardXp);
            //Debug.Log(mEvent.Response.data.hitter [i].cardXp +" : " + mEvent.Response.data.hitter [i].maxCardXp);
            cardgrade.Add(mEvent.Response.data.hitter [i].classNo);
            teamimage.Add(mEvent.Response.data.hitter [i].teamImageName.ToString());
            image.Add(mEvent.Response.data.hitter [i].cardImageName.ToString());
            number.Add(mEvent.Response.data.hitter [i].accrueCardXp.ToString());
            needuppoint.Add(mEvent.Response.data.hitter[i].needUpgradePoint.ToString());
        }
        transform.GetChild(1).GetComponent <UIDraggablePanel2>().Init(mEvent.Response.data.hitter.Count,
                                                                      delegate(UIListItem item, int index) {
            item.Target.gameObject.SetActive(true);
            item.Target.gameObject.transform.FindChild("needexp").GetComponent <UILabel>().text    = needuppoint[index];    //grade;
            item.Target.gameObject.transform.GetChild(2).GetChild(0).GetComponent <UILabel>().text = grade[index];          //grade;
            item.Target.gameObject.transform.GetChild(2).GetChild(1).GetComponent <UILabel>().text = maxlv[index];          //maxlv;
            item.Target.gameObject.transform.GetChild(2).GetChild(2).GetComponent <UILabel>().text = posi[index];           //position;
            item.Target.gameObject.transform.GetChild(2).GetChild(3).GetComponent <UILabel>().text = team[index];           //team;
            item.Target.gameObject.transform.GetChild(2).GetChild(4).GetComponent <UILabel>().text = backnum[index] + ".";  //num;
            item.Target.gameObject.transform.GetChild(2).GetChild(5).GetComponent <UILabel>().text = name[index];           //name;
            item.Target.gameObject.transform.GetChild(7).GetChild(1).GetComponent <UISprite> ().SetRect(0, 0, 16 + (hp[index] / maxhp[index] * 158), 20);
            item.Target.gameObject.transform.GetChild(7).GetChild(1).localPosition = new Vector3(-87, 0, 0);
            item.Target.gameObject.transform.GetChild(8).GetChild(1).GetComponent <UISprite> ().SetRect(0, 0, 16 + (exp[index] / maxexp[index] * 158), 20);
            item.Target.gameObject.transform.GetChild(8).GetChild(1).localPosition = new Vector3(-87, 0, 0);
            item.Target.gameObject.transform.GetChild(3).GetChild(1).GetComponent <UILabel> ().text        = nowlv[index];
            item.Target.gameObject.transform.GetChild(4).GetChild(1).GetComponent <UILabel> ().text        = add[index];
            item.Target.gameObject.transform.GetChild(1).GetChild(0).GetComponent <UISprite> ().spriteName = grades(cardgrade[index]);
            string imgName = UtilMgr.GetTeamEmblem(teamimage[index]);
            //Debug.Log(imgName);
            item.Target.gameObject.transform.GetChild(1).GetChild(0).GetChild(0).GetComponent <UISprite> ().spriteName      = imgName;
            item.Target.gameObject.transform.GetChild(1).GetChild(0).GetChild(1).GetChild(1).GetComponent <UILabel> ().text = backnum[index];
            item.Target.gameObject.transform.localPosition = new Vector3(maincard.transform.localPosition.x, item.Target.gameObject.transform.localPosition.y, item.Target.gameObject.transform.localPosition.z);
            WWW www = new WWW(Constants.IMAGE_SERVER_HOST + mEvent.Response.data.hitter [index].cardImagePath + image[index]);
            //Debug.Log (Constants.IMAGE_SERVER_HOST+mEvent.Response.data.hitter [index].cardImagePath+image[index]);
            StartCoroutine(GetImage(www, item.Target.gameObject.transform.GetChild(1).GetChild(0).GetChild(2).GetChild(0).gameObject));
            //item.Target.gameObject.transform.localPosition = new Vector3(999,999,999);
            cards.Add(item.Target.gameObject);
        });

        transform.FindChild("ListCards").GetComponent <UIDraggablePanel2> ().ResetPosition();
    }
コード例 #11
0
    void setarrray()
    {
        date.Clear();
        day.Clear();
        chacktoday();
        int num = 0;

        for (int i = 0; i < when.Count; i++)
        {
            for (int s = 0; s < daycount[i]; s++)
            {
                //Debug.Log ("max : " + mScheduleEvent.Response.data.Count + " now : " + num);
                ALL [i] [s] [0]  = mScheduleEvent.Response.data [num].extend [0].teamName;
                imgName          = UtilMgr.GetTeamEmblem(mScheduleEvent.Response.data [num].extend [0].imageName);
                ALL [i] [s] [1]  = imgName;
                ALL [i] [s] [2]  = mScheduleEvent.Response.data [num].extend [0].score.ToString();
                ALL [i] [s] [3]  = mScheduleEvent.Response.data [num].extend [1].teamName;
                imgName          = UtilMgr.GetTeamEmblem(mScheduleEvent.Response.data [num].extend [1].imageName);
                ALL [i] [s] [4]  = imgName;
                ALL [i] [s] [5]  = mScheduleEvent.Response.data [num].extend [1].score.ToString();
                ALL [i] [s] [6]  = gettime(num);
                ALL [i] [s] [7]  = getarea(num);
                ALL [i] [s] [8]  = mScheduleEvent.Response.data [num].bcastChannel;
                ALL [i] [s] [9]  = mScheduleEvent.Response.data [num].interActive;
                ALL [i] [s] [10] = mScheduleEvent.Response.data [num].gameStatus.ToString();
                //                0 : 왼쪽 팀 이름
                //                1 : 왼쪽 팀 이미지이름
                //                2 : 왼쪽 팀 점수
                //                3 : 오른쪽 팀 이름
                //                4 : 오른쪽 팀 이미지이름
                //                5 : 오른쪽 팀 점수
                //                6 : 경기시간
                //                7 : 경기장소
                //                8 : 방송
                //                9 : 경기진행정보(string)
                //                10 : 경기진행정보(int)
                day.Add(mScheduleEvent.Response.data [num].onairDay + "요일");
                date.Add(getdate(num));
                num++;
            }
        }
        for (int i = 0; i < when.Count; i++)
        {
            temp = (GameObject)Instantiate(bg_g_origin, new Vector3(0, 0, 0), bg_g_origin.transform.localRotation);
            temp.transform.parent     = bg_g_origin.transform.parent;
            temp.transform.localScale = new Vector3(1, 1, 1);
            if (i > 0)
            {
                float allsum = 0;
                float n      = 0;
                for (int b = 0; b < i; b++)
                {
                    allsum += daycount [b];
                    n      += 1;
                }
                temp.transform.localPosition = new Vector3(bg_g_origin.transform.localPosition.x, bg_g_origin.transform.localPosition.y - ((allsum * bargap) + (n * topmenu)), bg_g_origin.transform.localPosition.z);
            }
            else
            {
                temp.transform.localPosition = new Vector3(bg_g_origin.transform.localPosition.x, bg_g_origin.transform.localPosition.y, bg_g_origin.transform.localPosition.z);
            }
            temp.name = "Bg_g " + (i + 1).ToString();
            //Debug.Log ("day[when[i]] : " + day [when [i]] + " i : " + i + " [when[i]] : " + when [i]);
            temp.transform.FindChild("bg_add").FindChild("top_string").GetComponent <UILabel> ().text = day [when [i]];
            temp.transform.FindChild("bg_add").FindChild("top_string").FindChild("date").GetComponent <UILabel> ().text = date [when [i]];
            inputdata(i, temp);
            temp.SetActive(true);
            bg_g_list.Add(temp);
        }
        bg_g_origin.transform.parent.gameObject.SetActive(true);
        transform.FindChild("Scroll View").GetComponent <UIScrollView> ().ResetPosition();
        if (R)
        {
            reversalTodayPosition();
        }
        else
        {
            TodayPosition();
        }
    }