public void reset() { Transform transform = this.m_Obj.transform.Find("TaskPanel").transform; IEnumerator <IStarEvaluation> enumerator = Singleton <StarSystem> .GetInstance().GetEnumerator(); while (enumerator.MoveNext()) { this.conditionTexts[enumerator.Current.index] = transform.Find(string.Format("Condition{0}", enumerator.Current.index + 1)).GetComponent <Text>(); this.conditionTexts[enumerator.Current.index].text = enumerator.Current.description; if (enumerator.Current.isSuccess) { this.conditionTexts[enumerator.Current.index].color = Color.green; } else { this.conditionTexts[enumerator.Current.index].color = Color.white; } } UT.If_Null_Error <Text[]>(this.conditionTexts); }
public void Init(GameObject obj) { this.m_Obj = obj; SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if (curLvelContext.IsMobaMode() || curLvelContext.IsGameTypeGuide() || curLvelContext.IsGameTypeBurning() || curLvelContext.IsGameTypeArena()) { this.Hide(); return; } this.Show(); this.bPanelOpen = false; this.taskPanel = this.m_Obj.transform.Find("TaskPanel").gameObject; this.arrowIcon = this.m_Obj.transform.Find("Image").gameObject; this.taskPanel.CustomSetActive(false); this.PanelIcon = this.m_Obj.transform.Find("icon").GetComponent <Image>(); this.initEvent(); UT.If_Null_Error <GameObject>(this.m_Obj); UT.If_Null_Error <GameObject>(this.taskPanel); UT.If_Null_Error <Image>(this.PanelIcon); }
public void Init(GameObject obj) { this.m_Obj = obj; SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if ((curLvelContext.isPVPLevel || (curLvelContext.GameType == COM_GAME_TYPE.COM_SINGLE_GAME_OF_GUIDE)) || ((curLvelContext.GameType == COM_GAME_TYPE.COM_SINGLE_GAME_OF_BURNING) || (curLvelContext.GameType == COM_GAME_TYPE.COM_SINGLE_GAME_OF_ARENA))) { this.Hide(); } else { this.Show(); this.bPanelOpen = false; this.taskPanel = this.m_Obj.transform.Find("TaskPanel").gameObject; this.arrowIcon = this.m_Obj.transform.Find("Image").gameObject; this.taskPanel.CustomSetActive(false); this.PanelIcon = this.m_Obj.transform.Find("icon").GetComponent <Image>(); this.initEvent(); UT.If_Null_Error <GameObject>(this.m_Obj); UT.If_Null_Error <GameObject>(this.taskPanel); UT.If_Null_Error <Image>(this.PanelIcon); } }