| System/EquipStar/EquipStarMaterialCandidate.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipTrain/EquipTrainModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipTrain/EquipTrainPropertyBar.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipTrain/EquipTrainPropertyBarBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipTrain/EquipTrainWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/EquipStar/EquipStarMaterialCandidate.cs
@@ -27,6 +27,7 @@ var item = packModel.GetItemByGuid(this.equip); m_ItemName.text = item.config.ItemName; m_ItemName.color = UIHelper.GetUIColor(item.config.ItemColor, true); var successRate = model.GetMaterialSuccessRate(model.selectedLevel.value, model.selectedPlace.value, this.equip); m_Rate.text = string.Format("成功率 +{0}", Mathf.RoundToInt(successRate * 100)); m_Item.SetItem(item.config.ID, 1); System/EquipTrain/EquipTrainModel.cs
@@ -90,8 +90,8 @@ equipTrainMaxLevel.value = trainState == TrainState.Empty ? -1 : GetMaxTrainLevel(level, place); material.value = GetTrainMaterial(level, place); InitTrainableProperties(level, place); operateType.value = CalculateTrainOperateType(level, place); InitTrainableProperties(level, place, operateType.value); } } @@ -165,8 +165,8 @@ equipTrainMaxLevel.value = trainState == TrainState.Empty ? -1 : GetMaxTrainLevel(level, place); material.value = GetTrainMaterial(level, place); InitTrainableProperties(level, place); operateType.value = CalculateTrainOperateType(level, place); InitTrainableProperties(level, place, operateType.value); } public void SetInevitable(int index, bool invevitable) @@ -307,7 +307,7 @@ return places; } private void InitTrainableProperties(int level, int place) private void InitTrainableProperties(int level, int place, TrainOperateType operateType) { propertyBars.Clear(); var trainState = GetEquipPlaceTrainState(level, place); @@ -321,16 +321,19 @@ var propertyBar = new EquipTrainPropertyBar(data.config.attType1, trainState == TrainState.Empty ? 0 : data.config.attMax1, trainState); propertyBar.propertyValue.value = trainedProperties.x; propertyBar.deltaValue.value = unSavedProperties.x; propertyBar.operateType.value = operateType; propertyBars.Add(propertyBar); propertyBar = new EquipTrainPropertyBar(data.config.attType2, trainState == TrainState.Empty ? 0 : data.config.attMax2, trainState); propertyBar.propertyValue.value = trainedProperties.y; propertyBar.deltaValue.value = unSavedProperties.y; propertyBar.operateType.value = operateType; propertyBars.Add(propertyBar); propertyBar = new EquipTrainPropertyBar(data.config.attType3, trainState == TrainState.Empty ? 0 : data.config.attMax3, trainState); propertyBar.propertyValue.value = trainedProperties.z; propertyBar.deltaValue.value = unSavedProperties.z; propertyBar.operateType.value = operateType; propertyBars.Add(propertyBar); inevitableMaterialCount.value = CalculateInevitableMaterialCount(); System/EquipTrain/EquipTrainPropertyBar.cs
@@ -13,6 +13,8 @@ public readonly LogicInt propertyValue = new LogicInt(); public readonly LogicInt deltaValue = new LogicInt(); public readonly LogicBool inevitable = new LogicBool(); public readonly LogicEnum<EquipTrainModel.TrainOperateType> operateType = new LogicEnum<EquipTrainModel.TrainOperateType>(EquipTrainModel.TrainOperateType.None); public EquipTrainPropertyBar(int propertyId, int upperLimit, EquipTrainModel.TrainState trainState) { System/EquipTrain/EquipTrainPropertyBarBehaviour.cs
@@ -61,6 +61,7 @@ break; case EquipTrainModel.TrainState.Allowable: m_Inevitable.gameObject.SetActive(true); m_DeltaValue.gameObject.SetActive(true); break; } @@ -81,15 +82,25 @@ m_Progress.value = Mathf.Clamp01((float)value / maxValue); } if (force || propertyBar.deltaValue.dirty) if (force || propertyBar.deltaValue.dirty || propertyBar.operateType.dirty || propertyBar.inevitable.dirty) { var deltaValue = propertyBar.deltaValue.Fetch(); var operateType = propertyBar.operateType.Fetch(); var inevitable = propertyBar.inevitable.Fetch(); var isPerfect = propertyBar.upperLimit > 0 && propertyBar.propertyValue.value >= propertyBar.upperLimit; if (isPerfect) m_Inevitable.isOn = inevitable; if (operateType == EquipTrainModel.TrainOperateType.Train) { m_DeltaValue.text = "完美"; m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true); var isPerfect = propertyBar.upperLimit > 0 && propertyBar.propertyValue.value >= propertyBar.upperLimit; if (isPerfect) { m_DeltaValue.text = "完美"; m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true); } else { m_DeltaValue.text = inevitable ? "必增" : ""; } } else { @@ -109,6 +120,7 @@ m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true); } } } } System/EquipTrain/EquipTrainWin.cs
@@ -207,7 +207,7 @@ private void DisplayInevitableMaterial(int level, int place, int need) { var trainable = model.GetEquipPlaceTrainState(level, place) == EquipTrainModel.TrainState.Allowable; if (trainable) if (trainable && need > 0) { var own = packModel.GetItemCountByID(PackType.Item, GeneralDefine.equipTrainMustItemId); var type = EquipTrainModel.GetTrainType(place);