private void CreateObjects() { this.mRightInfoTable = base.transform.Find("contents").gameObject.AddComponent<UITable>(); this.mRightInfoTable.columns = 1; this.mRightInfoTable.direction = UITable.Direction.Down; this.mRightInfoTable.sorting = UITable.Sorting.Alphabetic; this.mRightInfoTable.hideInactive = true; this.mRightInfoTable.keepWithinPanel = true; this.mRightInfoTable.padding = new Vector2(0f, 2f); this.mValues = GameUITools.FindGameObject("a", this.mRightInfoTable.gameObject).AddComponent<GUIAttributeValue>(); this.mSkills = GameUITools.FindGameObject("b", this.mRightInfoTable.gameObject).AddComponent<LopetInfoSkillLayer>(); this.mSkills.Init(); this.mLopetDescSp = this.mRightInfoTable.transform.Find("e").GetComponent<UISprite>(); this.mDesc = GameUITools.FindUILabel("desc", this.mLopetDescSp.gameObject); }
public void Init(GUITeamManageSceneV2 basescene) { if (this.initFlag) { return; } this.initFlag = true; this.mBaseScene = basescene; this.mCurLopet = Globals.Instance.Player.LopetSystem.GetCurLopet(this.mBaseScene.IsLocalPlayer); GameObject gameObject = GameUITools.RegisterClickEvent("changeLopetBtn", new UIEventListener.VoidDelegate(this.OnChangeBtnClick), base.gameObject); gameObject.SetActive(this.mBaseScene.IsLocalPlayer); if (this.mCurLopet == null) { GameUITools.SetLabelLocalText("Label", "Lopet0", gameObject); Vector3 localPosition = gameObject.transform.localPosition; localPosition.x = -40f; gameObject.transform.localPosition = localPosition; } else { GameUITools.SetLabelLocalText("Label", "Lopet1", gameObject); } GameUITools.FindUISprite("New", gameObject).enabled = Globals.Instance.Player.LopetSystem.HasLopet2Change(); gameObject = GameUITools.FindGameObject("topInfo", base.gameObject); if (this.mCurLopet == null) { gameObject.SetActive(false); } else { gameObject.AddComponent<GUILopetTitleInfo>().Refresh(this.mCurLopet); UITable component = GameUITools.FindGameObject("rightInfo/panel/content", base.gameObject).GetComponent<UITable>(); GameUITools.FindGameObject("a", component.gameObject).AddComponent<GUIAttributeValue>().Refresh(this.mCurLopet); this.mLopetSkills = GameUITools.FindGameObject("b", component.gameObject).AddComponent<LopetInfoSkillLayer>(); this.mLopetSkills.Init(); this.mLopetSkills.Refresh(this.mCurLopet); } this.CreateModel(); gameObject = GameUITools.RegisterClickEvent("yangCBtn", new UIEventListener.VoidDelegate(this.OnYangChengClick), base.gameObject); GameUITools.FindGameObject("Effect", gameObject).SetActive(Tools.CanCurLopetAwake() || Tools.CanCurLopetLevelup()); gameObject.SetActive(this.mBaseScene.IsLocalPlayer && Globals.Instance.Player.LopetSystem.GetCurLopet(this.mBaseScene.IsLocalPlayer) != null); }