public void InitQuizFirst() { if (mEventProgQuiz.Response.data != null) { if (mEventProgQuiz.Response.data.quiz.Count > 0) { UtilMgr.gameround = ((mEventProgQuiz.Response.data.quiz [0].gameRound) * 2) + (mEventProgQuiz.Response.data.quiz [0].inningType - 1); Debug.Log("InitQuizFirst"); Debug.Log("mEventProgQuiz.Response.data.quiz[0] : " + mEventProgQuiz.Response.data.quiz[0].playerName); transform.parent.parent.FindChild("GameObject").FindChild("TF_Landing").GetComponent <LandingManager>(). SetHitter(mEventProgQuiz.Response.data); if (ScriptMainTop.LandingState == 2 || ScriptMainTop.LandingState == 3) { // string TeamColor = mEventProgQuiz.Response.data.team[1].teamColor; // TeamColor = TeamColor.Replace("#",""); // LandingManager.TeamColor = TeamColor; // transform.parent.parent.FindChild("GameObject").FindChild("TF_Landing").GetComponent<LandingManager>(). // // SetTeamColor(TeamColor); } } } UtilMgr.DismissLoading(); QuizMgr.SetQuizList(mEventProgQuiz.Response.data.quiz); ResetList(); mFirstLoading = false; }
public void InitQuizList(GetQuizEvent quizEvent) { QuizMgr.SetQuizList(mEventProgQuiz.Response.data.quiz); foreach (GameObject go in mQuizListItems) { go.transform.parent = null; NGUITools.DestroyImmediate(go); } mQuizListItems.Clear(); mFirstLoading = true; mAccumulatedY = 0f; mPosGuide = 0f; mPreItemSize = 30f; for (int i = 0; i < mEventProgQuiz.Response.data.quiz.Count; i++) { QuizInfo quizInfo = mEventProgQuiz.Response.data.quiz[i]; AddQuizIntoList(quizInfo); } mList.GetComponent <UIScrollView> ().ResetPosition(); mFirstLoading = false; }