Example #1
0
 void Start()
 {
     bg_g_origin.SetActive(false);
     topmenu        = gap - (bargap * 5);
     mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "setarrray"));
     NetMgr.GetScheduleAll(mScheduleEvent);
 }
Example #2
0
    void InitMatchList()
    {
        mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "GotSchedule"));
        NetMgr.GetScheduleMore(null,
                               UserMgr.UserInfo.teamSeq,
                               mScheduleEvent);
//		UtilMgr.ShowLoading (true);
    }
    public void onhit()
    {
        nums = 0;
        UtilMgr.AddBackEvent(new EventDelegate(this, "BackPressed"));
//		if(transform.parent.parent.parent.name=="UI Root"){
//			BntMenu = transform.parent.parent.parent.FindChild ("Top").GetChild (0).GetChild (1).gameObject;
//		}else if(transform.parent.parent.parent.parent.name=="UI Root"){
//			BntMenu = transform.parent.parent.parent.parent.FindChild ("Top").GetChild (0).GetChild (1).gameObject;
//		}
        BntMenu.GetComponent <PlayMakerFSM> ().SendEvent("Close Menu");

        if (ING)
        {
            if (B)
            {
                B = false;
                transform.GetChild(1).transform.localPosition = (new Vector3(0, 0, 0));
                transform.FindChild("SprBack").GetComponent <UIButton>().enabled = false;
                w    = false;
                LEFT = true;
            }
            else
            {
                B = true;
                transform.GetChild(1).transform.localPosition = (new Vector3(-720, 0, 0));
                LEFT = false;
            }
            if (what)
            {
                what = false;
                ING  = false;
                StartCoroutine(rolling());
            }
            else
            {
                what = true;
                ING  = false;
                D    = transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).gameObject;

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

                mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "getdata"));
                NetMgr.GetScheduleAll(
                    mScheduleEvent);

                //NEW.transform.GetChild(2).GetChild(0).GetComponent<UILabel>().text = "19:34";

                //Debug.Log(NEW);
                //Debug.Log(NEW.transform.parent);
                //}



                StartCoroutine(rolling());
            }
        }
    }
Example #4
0
 void InitTopInfo()
 {
     transform.FindChild("TopInfoItem").GetComponent <ScriptTopInfoItem>().SetGroupInfo();
     mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "GotSchedule"));
     NetMgr.GetScheduleMore(
         null,
         UserMgr.UserInfo.teamSeq,
         mScheduleEvent);
 }
 public void GoGame(string teamC, string GameS, string nowday)
 {
     teamCs  = teamC;
     GameSs  = GameS;
     nowdays = nowday;
     //bool chek = false;
     mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "SetGame"));
     NetMgr.GetScheduleAll(mScheduleEvent);
 }
Example #6
0
    IEnumerator GetImageStart(WWW www, GamePresetLineupInfo index)
    {
        yield return(www);

        Texture2D tmpTex = new Texture2D(0, 0);

        www.LoadImageIntoTexture(tmpTex);
        index.texture = tmpTex;
        count        += 1;
        if (count == GGPL.Response.data.Count)
        {
            try{
                UserMgr.LineUpList.Add(transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text, GGPL.Response.data);
            }
            catch {
                Debug.Log("Same");
            }
            GSE = new GetScheduleEvent(new EventDelegate(this, "GET"));
            NetMgr.GetScheduleToday(GSE);
        }
    }
Example #7
0
 //해당 경기의 라인업이 없을시 라인업을 가저옴
 void GetLineupStart()
 {
     count = 0;
     if (GGPL.Response.data.Count != 0)
     {
         for (int i = 0; i < GGPL.Response.data.Count; i++)
         {
             WWW www = new WWW(Constants.IMAGE_SERVER_HOST + GGPL.Response.data [i].imagePath + GGPL.Response.data [i].imageName);
             StartCoroutine(GetImageStart(www, GGPL.Response.data [i]));
         }
     }
     else
     {
         try{
             UserMgr.LineUpList.Add(transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text, GGPL.Response.data);
         }
         catch {
             Debug.Log("Same");
         }
         GSE = new GetScheduleEvent(new EventDelegate(this, "GET"));
         NetMgr.GetScheduleToday(GSE);
     }
 }
Example #8
0
    public void Button()
    {
        //선택된 콘테스트의 참여루비
        UserMgr.UsingRuby = int.Parse(transform.FindChild("Cost").FindChild("value").GetComponent <UILabel> ().text.Replace("[b]", ""));
        ScriptMainTop.OpenBettingCheck = true;
        //선택된 콘테스트의 gameseq
        UserMgr.GameSeq = int.Parse(transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel> ().text);
        transform.root.FindChild("Scroll").FindChild("Main").FindChild("PreSetting").GetComponent <PreSettingCommander>
            ().Mode = "Update";
        UserMgr.CurrentContestSeq = int.Parse(transform.FindChild("BG").FindChild("contestSeq").GetComponent <UILabel> ().text);
        UserMgr.CurrentPresetSeq  = int.Parse(transform.FindChild("BG").FindChild("presetSeq").GetComponent <UILabel> ().text);

        Debug.Log("GETGETGET");


        for (int i = 0; i < transform.FindChild("BG").FindChild("presetList").childCount; i++)
        {
            List.Add(int.Parse(transform.FindChild("BG").FindChild("presetList").GetChild(i).GetComponent <UILabel>().text));
        }


//		GSE = new GetScheduleEvent(new EventDelegate(this,"GET"));
//		NetMgr.GetScheduleToday (GSE);
//		UserMgr.ContestStatus = 1;



        if (UserMgr.ContestStatus == 2)
        {
            //게임이 진행 중 일때


            try{
                if (UserMgr.LineUpList[transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text] != null)
                {
                    Lists = UserMgr.LineUpList[transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text];
                    GSE   = new GetScheduleEvent(new EventDelegate(this, "GET"));
                    NetMgr.GetScheduleToday(GSE);
                }
                else
                {
                    Debug.Log("else");
                    GGPL = new GetGamePresetLineupEvent(new EventDelegate(this, "GetLineupStart"));
                    NetMgr.GetGamePresetLineup(int.Parse(transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text), GGPL);
                }
            }catch {
                Debug.Log("Catch");
                GGPL = new GetGamePresetLineupEvent(new EventDelegate(this, "GetLineupStart"));
                NetMgr.GetGamePresetLineup(int.Parse(transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text), GGPL);
            }
        }
        else
        {
            //게임이 시작되지 않았을 때

            try{
                if (UserMgr.LineUpList[transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text] != null)
                {
                    Lists = UserMgr.LineUpList[transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text];
                    PresetChange();
                }
                else
                {
                    Debug.Log("else");
                    GGPL = new GetGamePresetLineupEvent(new EventDelegate(this, "GetLineup"));
                    NetMgr.GetGamePresetLineup(int.Parse(transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text), GGPL);
                }
            }catch {
                Debug.Log("Catch");
                GGPL = new GetGamePresetLineupEvent(new EventDelegate(this, "GetLineup"));
                NetMgr.GetGamePresetLineup(int.Parse(transform.parent.FindChild("BG").FindChild("GameSeq").GetComponent <UILabel>().text), GGPL);
            }
        }
    }
    void Start()
    {
        //	Point.GetComponent<UILabel> ().text

//		CRE = new ContestRankingEvent (new EventDelegate (this,"getRank"));
//		NetMgr.GetContestRanking (CRE);
        QuizMgr.EnterMain(this);
        if (LandingState == 4)
        {
            string TeamColor = UserMgr.UserInfo.favoBB.teamColor;
            TeamColor = TeamColor.Replace("#", "");
            gameobj.transform.FindChild("TF_Landing").GetComponent <LandingManager>().SetTeamColor(TeamColor);
            LandingState = 0;

            transform.FindChild("TopInfoItem").FindChild("BtnMenu 1").gameObject.SetActive(false);
            mBtnHighlight.GetComponent <UIButton> ().isEnabled = false;
            mHighlight.SetActive(false);
            mLineup.SetActive(false);
            mBingo.SetActive(false);
            mLivetalk.SetActive(false);
            mBetting.SetActive(false);

            gameobj.transform.FindChild("TF_Landing").GetComponent <LandingManager>().nonstart = true;

            gameobj.SetActive(true);
            QuizMgr.EnterMain(this);


            Debug.Log("zzzz");
            mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "SetSchedule"));
            NetMgr.GetScheduleAll(mScheduleEvent);
        }
        else if (LandingState == 0)
        {
            transform.FindChild("TopInfoItem").FindChild("BtnMenu 1").gameObject.SetActive(false);
            mBtnHighlight.GetComponent <UIButton> ().isEnabled = false;
            mHighlight.SetActive(false);
            mLineup.SetActive(false);
            mBingo.SetActive(false);
            mLivetalk.SetActive(false);
            mBetting.SetActive(false);
            gameobj.SetActive(false);
            QuizMgr.EnterMain(this);



            mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "SetSchedule1"));
            NetMgr.GetScheduleAll(mScheduleEvent);
        }
        else if (LandingState == 5)
        {
            transform.FindChild("TopInfoItem").FindChild("BtnMenu 1").gameObject.SetActive(false);
            mBtnHighlight.GetComponent <UIButton> ().isEnabled = false;
            mHighlight.SetActive(false);
            mLineup.SetActive(false);
            mBingo.SetActive(false);
            mLivetalk.SetActive(false);
            mBetting.SetActive(false);
            gameobj.SetActive(false);
            QuizMgr.EnterMain(this);



            mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "SetSchedule2"));
            NetMgr.GetScheduleAll(mScheduleEvent);
        }

        //CheckFirst();
    }
 void Button()
 {
     mScheduleEvent = new GetScheduleEvent(new EventDelegate(this, "Setdata"));
     NetMgr.GetScheduleAll(
         mScheduleEvent);
 }