private void SetupDifficultyView(Transform trans, LevelDiffculty difficulty) { Color difficultyColor = Miscs.GetDifficultyColor(difficulty); string difficultyDesc = Miscs.GetDifficultyDesc(difficulty); string difficultyMark = UIUtil.GetDifficultyMark(difficulty); trans.Find("Color").GetComponent <Image>().color = difficultyColor; trans.Find("Desc").GetComponent <Text>().text = difficultyDesc; trans.Find("Icon/Image").GetComponent <Image>().color = difficultyColor; trans.Find("Icon/Text").GetComponent <Text>().text = difficultyMark; }
private void SetupMissionPanel() { Transform missionTrans = base.view.transform.Find("Missions"); missionTrans.Find("Title/Name/Text").GetComponent <Text>().text = this.levelData.Title; missionTrans.Find("Title/HorizontialLayOut/Recommand/LvNum").GetComponent <Text>().text = this.levelData.RecommandLv.ToString(); if (this.levelData.LevelType != 1) { missionTrans.Find("Title/HorizontialLayOut/Difficulty").gameObject.SetActive(false); } else { Transform transform2 = missionTrans.Find("Title/HorizontialLayOut/Difficulty/Difficulty"); Color difficultyColor = Miscs.GetDifficultyColor(this.difficulty); string str = Miscs.GetDifficultyDesc(this.difficulty).Substring(0, 2); string difficultyMark = UIUtil.GetDifficultyMark(this.difficulty); transform2.Find("Color").GetComponent <Image>().color = difficultyColor; transform2.Find("Desc").GetComponent <Text>().text = str; transform2.Find("Icon/Image").GetComponent <Image>().color = difficultyColor; transform2.Find("Icon/Image/Text").GetComponent <Text>().text = difficultyMark; base.view.transform.Find("BG/GradualRight").GetComponent <Image>().color = difficultyColor; missionTrans.Find("BG/GradualLeft").GetComponent <Image>().color = difficultyColor; } Transform transform3 = missionTrans.Find("MissionList/MissionPanel"); for (int i = 0; i < transform3.childCount; i++) { Transform child = transform3.GetChild(i); if (i >= this.levelData.challengeList.Count) { child.gameObject.SetActive(false); } else { LevelChallengeDataItem item = this.levelData.challengeList[i]; string displayTarget = item.DisplayTarget; child.Find("Achieve/Text").GetComponent <Text>().text = displayTarget; child.Find("Unachieve/Text").GetComponent <Text>().text = displayTarget; child.Find("Achieve").gameObject.SetActive(item.Finished); child.Find("Unachieve").gameObject.SetActive(!item.Finished); child.Find("Loop").gameObject.SetActive(item.IsSpecialChallenge()); } } this.RefreshDropList(); this.RefreshChallengeNumber(missionTrans); }