public void Init(EquipMasterTab.CheckChangeCallback cb) { this.CreateObjects(); this.CheckChangeCallbackEvent = cb; }
private void CreateObjects() { GameUITools.RegisterClickEvent("CloseBtn", new UIEventListener.VoidDelegate(this.OnCloseBtnClick), base.gameObject); GameObject gameObject = GameUITools.FindGameObject("Tabs", base.gameObject); this.mEquipEnhanceTab = GameUITools.FindGameObject("EquipEnhanceTab", gameObject).AddComponent<EquipMasterTab>(); this.mEquipEnhanceTab.Init(new EquipMasterTab.CheckChangeCallback(this.OnTabClick)); this.mEquipRefineTab = GameUITools.FindGameObject("EquipRefineTab", gameObject).AddComponent<EquipMasterTab>(); this.mEquipRefineTab.Init(new EquipMasterTab.CheckChangeCallback(this.OnTabClick)); this.mTrinketEnhanceTab = GameUITools.FindGameObject("TrinketEnhanceTab", gameObject).AddComponent<EquipMasterTab>(); this.mTrinketEnhanceTab.Init(new EquipMasterTab.CheckChangeCallback(this.OnTabClick)); this.mTrinketRefineTab = GameUITools.FindGameObject("TrinketRefineTab", gameObject).AddComponent<EquipMasterTab>(); this.mTrinketRefineTab.Init(new EquipMasterTab.CheckChangeCallback(this.OnTabClick)); gameObject = GameUITools.FindGameObject("Info", base.gameObject); this.mProgress = GameUITools.FindUILabel("Progress", gameObject); this.mTip = GameUITools.FindUILabel("Tip", gameObject); this.mStartingTitle = GameUITools.FindUILabel("StartingTitle", gameObject); this.mStartingValue = GameUITools.FindUILabel("StartingValue", gameObject); this.mNextTitle = GameUITools.FindUILabel("NextTitle", gameObject); this.mNextValue = GameUITools.FindUILabel("NextValue", gameObject); this.mCondition = GameUITools.FindUILabel("Condition", gameObject); this.mEffect = GameUITools.FindGameObject("Effect", gameObject); gameObject = GameUITools.FindGameObject("Items", gameObject); for (int i = 0; i < gameObject.transform.childCount; i++) { this.mItems.Add(gameObject.transform.GetChild(i).gameObject.AddComponent<EquipMasterItem>()); this.mItems[i].Init(this); } }