void Start() { mHighlight.SetActive(true); mLineup.SetActive(false); mBingo.SetActive(false); mLivetalk.SetActive(false); mBetting.SetActive(false); #if (UNITY_EDITOR) #elif (UNITY_ANDROID) QuizMgr.EnterMain(this); #else #endif }
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 SetSchedule2() { //bool chek = false; if (mScheduleEvent.Response.data != null) { List <string> ch = new List <string> (); //for (int p = 0; p < 7; p++) { for (int i = 0; i < mScheduleEvent.Response.data.Count; i++) { char [] array = mScheduleEvent.Response.data [i].startDate.ToCharArray(); for (int z = 6; z < array.Length; z++) { ch.Add(array [z].ToString()); } string result = string.Join("", ch.ToArray()); ch.Clear(); // int num = p; // if (System.DateTime.Now.Day + num > 31) { // num = System.DateTime.Now.Day + num - 31; // num = num - System.DateTime.Now.Day; // } if (System.DateTime.Now.Day == int.Parse(result)) { //if (System.DateTime.Now.Day + num == int.Parse (result)) { //chek = true; if (mScheduleEvent.Response.data [i].extend [0].teamName == UtilMgr.SelectTeam) { UserMgr.Schedule = mScheduleEvent.Response.data [i]; if (mScheduleEvent.Response.data [i].gameStatus == null) { LandingState = 0; } else { if (mScheduleEvent.Response.data [i].gameStatus == 1) { LandingState = 2; } else if (mScheduleEvent.Response.data [i].gameStatus == 2) { LandingState = 3; } else { LandingState = 0; } } gameobj.SetActive(true); mHighlight.SetActive(true); InitTopInfo(); return; } else if (mScheduleEvent.Response.data [i].extend [1].teamName == UtilMgr.SelectTeam) { UserMgr.Schedule = mScheduleEvent.Response.data [i]; if (mScheduleEvent.Response.data [i].gameStatus == null) { LandingState = 0; } else { if (mScheduleEvent.Response.data [i].gameStatus == 1) { LandingState = 2; } else if (mScheduleEvent.Response.data [i].gameStatus == 2) { LandingState = 3; } else { LandingState = 0; } } gameobj.SetActive(true); mHighlight.SetActive(true); InitTopInfo(); return; } } //} } } QuizMgr.EnterMain(this); gameobj.SetActive(true); mHighlight.SetActive(true); InitTopInfo(); }
void SetSchedule() { Debug.Log("zzzz"); //bool chek = false; if (mScheduleEvent.Response.data != null) { List <string> ch = new List <string> (); //for (int p = 0; p < 7; p++) { for (int i = 0; i < mScheduleEvent.Response.data.Count; i++) { char [] array = mScheduleEvent.Response.data [i].startDate.ToCharArray(); for (int z = 6; z < array.Length; z++) { ch.Add(array [z].ToString()); } string result = string.Join("", ch.ToArray()); ch.Clear(); // int num = p; // if (System.DateTime.Now.Day + num > 31) { // num = System.DateTime.Now.Day + num - 31; // num = num - System.DateTime.Now.Day; // } if (System.DateTime.Now.Day == int.Parse(result)) { //if (System.DateTime.Now.Day + num == int.Parse (result)) { //chek = true; if (mScheduleEvent.Response.data [i].extend [0].teamCode == UserMgr.UserInfo.GetTeamCode()) { UserMgr.Schedule = mScheduleEvent.Response.data [i]; if (mScheduleEvent.Response.data [i].gameStatus == null) { LandingState = 0; } else { if (mScheduleEvent.Response.data [i].gameStatus == 1) { LandingState = 2; } else if (mScheduleEvent.Response.data [i].gameStatus == 2) { LandingState = 3; } } gameobj.transform.FindChild("TF_Landing").GetComponent <LandingManager>().nonstart = false; gameobj.transform.FindChild("TF_Landing").GetComponent <LandingManager>().Start(); mHighlight.SetActive(true); InitTopInfo(); return; } else if (mScheduleEvent.Response.data [i].extend [1].teamCode == UserMgr.UserInfo.GetTeamCode()) { UserMgr.Schedule = mScheduleEvent.Response.data [i]; if (mScheduleEvent.Response.data [i].gameStatus == null) { LandingState = 0; } else { if (mScheduleEvent.Response.data [i].gameStatus == 1) { LandingState = 2; } else if (mScheduleEvent.Response.data [i].gameStatus == 2) { LandingState = 3; } } gameobj.transform.FindChild("TF_Landing").GetComponent <LandingManager>().nonstart = false; gameobj.transform.FindChild("TF_Landing").GetComponent <LandingManager>().Start(); mHighlight.SetActive(true); InitTopInfo(); return; } } //} } } gameobj.transform.FindChild("TF_Landing").GetComponent <LandingManager>().nonstart = false; gameobj.transform.FindChild("TF_Landing").GetComponent <LandingManager>().Start(); QuizMgr.EnterMain(this); mHighlight.SetActive(true); InitTopInfo(); }