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 Init(int wingId) { WingGlobal.ResetRawImage(); if (this.mWingPreviewCell != null && this.mWingPreviewCell.get_gameObject() != null) { Object.Destroy(this.mWingPreviewCell.get_gameObject()); } wings wingInfo = WingManager.GetWingInfo(wingId); int wingLv = WingManager.GetWingLv(wingId); int wingModel = WingManager.GetWingModel(wingId, wingLv); this.mWingPreviewCell = WingGlobal.GetOneWingPreview(base.get_transform()); this.mWingPreviewCell.SetRawImage(wingModel); this.mWingPreviewCell.SetName(TextColorMgr.GetColorByQuality(wingInfo.name, wingInfo.color)); }