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)); }
public void ShowRoleModel(int profession, List <WearEquipInfo> equipInfos, List <string> fashionInfos, WearWingInfo wearWingInfo) { this.m_profession = profession; this.m_equipInfos = equipInfos; this.m_fashionInfos = fashionInfos; this.m_wingInfo = wearWingInfo; int wingID = (this.m_wingInfo == null) ? 0 : this.m_wingInfo.wingId; int wingLv = (this.m_wingInfo == null) ? 0 : this.m_wingInfo.lv; bool wingHide = this.m_wingInfo != null && this.m_wingInfo.wingHidden; if (DataReader <RoleCreate> .Get(profession) == null) { return; } if (this.m_equipInfos == null) { return; } this.equipIDs.Clear(); for (int i = 0; i < equipInfos.get_Count(); i++) { this.equipIDs.Add(equipInfos.get_Item(i).id); } this.ExteriorUnit.WrapSetData(delegate { this.ExteriorUnit.SetType(this.m_profession); this.ExteriorUnit.EquipIDs = this.equipIDs; this.ExteriorUnit.FashionIDs = fashionInfos; this.ExteriorUnit.WingID = WingManager.GetWingModel(wingID, wingLv); this.ExteriorUnit.IsHideWing = wingHide; }); ModelDisplayManager.Instance.ShowModel(this.ExteriorUnit.FinalModelID, true, ModelDisplayManager.OFFSET_TO_ROLESHOWUI, delegate(int uid) { this.roleModel = ModelDisplayManager.Instance.GetUIModel(uid); if (this.roleModel != null) { this.roleModel.get_transform().set_localEulerAngles(Vector3.get_zero()); this.roleModel.EquipOn(this.ExteriorUnit.FinalWeaponID, this.ExteriorUnit.FinalWeaponGogok); this.roleModel.EquipOn(this.ExteriorUnit.FinalClothesID, 0); this.roleModel.EquipWingOn(this.ExteriorUnit.FinalWingID); LayerSystem.SetGameObjectLayer(this.roleModel.get_gameObject(), "CameraRange", 2); this.roleModel.PreciseSetAction("idle_city"); } }); }