| | |
| | | return washLevelMaxConfigs.ContainsKey(key) ? washLevelMaxConfigs[key] : null; |
| | | } |
| | | |
| | | public static int GetMaxLevel( int type) |
| | | { |
| | | var max = 0; |
| | | foreach ( var config in washLevelMaxConfigs.Values) |
| | | { |
| | | if ( config .equipType==type && config .levelMax >max) |
| | | { |
| | | max = config.levelMax; |
| | | } |
| | | } |
| | | |
| | | return max; |
| | | } |
| | | |
| | | } |
| | |
| | | { |
| | | CloseSubWindows(); |
| | | WindowCenter.Instance.Open<EquipStarWin>(); |
| | | functionOrder = m_Star.order; |
| | | } |
| | | |
| | | private void OpenStrengthenWin() |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | model.SelectLevel(equipModel.GetLastestUnLockEquipSet()); |
| | | |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| | | } |
| | |
| | | } |
| | | |
| | | equipTrainLevel.value = GetTrainLevel(level, place); |
| | | equipTrainMaxLevel.value = GetMaxTrainLevel(level); |
| | | equipTrainMaxLevel.value = GetMaxTrainLevel(level, place); |
| | | material.value = GetTrainMaterial(level, place); |
| | | |
| | | InitTrainableProperties(level, place); |
| | |
| | | return 5; |
| | | } |
| | | |
| | | public int GetMaxTrainLevel(int level) |
| | | public int GetMaxTrainLevel(int place) |
| | | { |
| | | |
| | | return 5; |
| | | var type = GetTrainType(place); |
| | | return WashLevelMaxConfig.GetMaxLevel(type); |
| | | } |
| | | |
| | | public int GetMaxTrainLevel(int level, int place) |
| | | { |
| | | return 5; |
| | | var star = starModel.GetEquipStarLevel(level, place); |
| | | var type = GetTrainType(place); |
| | | var config = WashLevelMaxConfig.Get(type, star); |
| | | if (config == null) |
| | | { |
| | | return 0; |
| | | } |
| | | else |
| | | { |
| | | return config.levelMax; |
| | | } |
| | | } |
| | | |
| | | public List<EquipTrainCandidate> GetCandidatePlaces() |
| | |
| | | return false; |
| | | } |
| | | |
| | | var maxStarLevel = GetMaxTrainLevel(equip.config.ItemColor, equip.config.LV); |
| | | var maxStarLevel = GetMaxTrainLevel(equip.config.LV, equip.config.EquipPlace); |
| | | var currentStarLevel = GetTrainLevel(equip.config.LV, equip.config.EquipPlace); |
| | | return currentStarLevel < maxStarLevel; |
| | | } |
| | |
| | | var unSavedProperties = GetUnSavedProperties(level, place); |
| | | var trainedProperties = GetTrainedProperties(level, place); |
| | | var trainLevel = GetTrainLevel(level, place); |
| | | var data = EquipWashConfig.Get(GetTrainType(place), trainLevel); |
| | | var data = EquipWashConfig.Get(GetTrainType(place), trainLevel + 1); |
| | | |
| | | var propertyBar = new EquipTrainPropertyBar(data.config.attType1, data.config.attMax1); |
| | | propertyBar.propertyValue.value = trainedProperties.x; |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| | | |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | protected override void OnAfterClose() |
| | | { |
| | | model.ResetOperateParams(); |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | model.SelectLevel(equipModel.GetLastestUnLockEquipSet()); |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| | | } |
| | | |
| | | protected override void LateUpdate() |
| | |
| | | |
| | | private void DisplayMaterial(int level, int place, int itemId) |
| | | { |
| | | m_Material.SetItem(itemId, 1); |
| | | |
| | | var need = model.GetMaterialNeed(level, place); |
| | | var own = packModel.GetItemCountByID(PackType.Item, itemId); |
| | | var enough = own >= need; |
| | | m_MaterialCount.text = string.Format("{0}/{1}", UIHelper.AppendStringColor(enough ? TextColType.White : TextColType.Red, own.ToString(), true), need); |
| | | if (itemId > 0) |
| | | { |
| | | m_Material.gameObject.SetActive(true); |
| | | m_MaterialCount.gameObject.SetActive(true); |
| | | m_Material.SetItem(itemId, 1); |
| | | var need = model.GetMaterialNeed(level, place); |
| | | var own = packModel.GetItemCountByID(PackType.Item, itemId); |
| | | var enough = own >= need; |
| | | m_MaterialCount.text = string.Format("{0}/{1}", UIHelper.AppendStringColor(enough ? TextColType.White : TextColType.Red, own.ToString(), true), need); |
| | | } |
| | | else |
| | | { |
| | | m_Material.gameObject.SetActive(false); |
| | | m_MaterialCount.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | private void DisplayInevitableMaterial(int level, int place, int need) |
| | |
| | | void Strengthen1Button()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | var starModel = ModelCenter.Instance.GetModel<EquipStarModel>();
|
| | | var equipModel = ModelCenter.Instance.GetModel<EquipModel>();
|
| | | starModel.SelectLevel(equipModel.GetLastestUnLockEquipSet());
|
| | | WindowCenter.Instance.Open<EquipFrameWin>(false, 0);
|
| | | }
|
| | |
|