public void Init(int wingId) { WingGlobal.ResetRawImage(); if (this.m_WingPreviewCellCurrent != null && this.m_WingPreviewCellCurrent.get_gameObject() != null) { Object.Destroy(this.m_WingPreviewCellCurrent.get_gameObject()); } if (this.m_WingPreviewCellNext != null && this.m_WingPreviewCellNext.get_gameObject() != null) { Object.Destroy(this.m_WingPreviewCellNext.get_gameObject()); } this.m_current_wingId = wingId; this.m_current_winglevel = WingManager.GetWingLv(wingId); this.m_wingLvInfoL = WingManager.GetWingLvInfo(this.m_current_wingId, this.m_current_winglevel); this.m_wingLvInfoR = WingManager.GetWingLvInfoNextDifferent(this.m_current_wingId, this.m_current_winglevel); if (this.m_wingLvInfoL.model == this.m_wingLvInfoR.model) { this.m_wingLvInfoL = WingManager.GetWingLvInfoPreDifferent(this.m_current_wingId, this.m_current_winglevel); } this.m_WingPreviewCellCurrent = WingGlobal.GetOneWingPreview(base.get_transform()); this.m_WingPreviewCellCurrent.get_transform().set_localPosition(new Vector3(-245f, 0f)); this.m_WingPreviewCellNext = WingGlobal.GetOneWingPreview(base.get_transform()); this.m_WingPreviewCellNext.get_transform().set_localPosition(new Vector3(245f, 0f)); base.get_transform().Find("imgArrow").SetAsLastSibling(); this.SetWingPreviewCellAll(); }
private void SetWingPreviewCellL() { wingLv wingLvInfoPreDifferent = WingManager.GetWingLvInfoPreDifferent(this.m_current_wingId, this.m_wingLvInfoL.lv); this.m_goBtnArrowL.SetActive(wingLvInfoPreDifferent.model != this.m_wingLvInfoL.model); this.m_WingPreviewCellCurrent.SetRawImage(this.m_wingLvInfoL.model); this.m_WingPreviewCellCurrent.SetName(TextColorMgr.GetColorByQuality(this.m_wingLvInfoL.name, this.m_wingLvInfoL.color)); if (this.m_current_winglevel == 0 || this.m_wingLvInfoL.lv > this.m_current_winglevel) { this.m_WingPreviewCellCurrent.SetCondition(true, string.Format(GameDataUtils.GetChineseContent(16301, false), this.m_wingLvInfoL.lv)); } else { this.m_WingPreviewCellCurrent.SetCondition(false, string.Empty); } if (this.m_current_winglevel == 0 && !WingManager.IsCanActiveWing(this.m_current_wingId)) { wings wingInfo = WingManager.GetWingInfo(this.m_current_wingId); this.m_WingPreviewCellCurrent.ShowButtonGet(true); this.m_WingPreviewCellCurrent.actionButtonGet = delegate { this.OnClickBtnGet(wingInfo.activation.get_Item(0).key); }; } else { this.m_WingPreviewCellCurrent.ShowButtonGet(false); } }
private void OnClickBtnArrowL() { wingLv wingLvInfoPreDifferent = WingManager.GetWingLvInfoPreDifferent(this.m_current_wingId, this.m_wingLvInfoL.lv); if (wingLvInfoPreDifferent.model == this.m_wingLvInfoL.model) { return; } this.m_wingLvInfoR = this.m_wingLvInfoL; this.m_wingLvInfoL = wingLvInfoPreDifferent; WingGlobal.ResetRawImage(); this.SetWingPreviewCellAll(); }