| | |
| | | |
| | | private void InitTrainableProperties(Int2 equipPosition, TrainOperateType operateType) |
| | | { |
| | | //此段代码特殊处理,因为 propertyBars.Clear(); |
| | | bool ison1 = false; |
| | | bool ison2 = false; |
| | | bool ison3 = false; |
| | | if (propertyBars.Count == 3) |
| | | { |
| | | ison1 = propertyBars[0].inevitable.value; |
| | | ison2 = propertyBars[1].inevitable.value; |
| | | ison3 = propertyBars[2].inevitable.value; |
| | | } |
| | | ///============================= |
| | | |
| | | propertyBars.Clear(); |
| | | var trainState = GetEquipPlaceTrainState(equipPosition); |
| | | var absoluteMax = GetMaxTrainLevel(equipPosition.y); |
| | |
| | | propertyBar.propertyValue.value = trainedProperties.x; |
| | | propertyBar.deltaValue.value = unSavedProperties.x; |
| | | propertyBar.operateType.value = operateType; |
| | | propertyBar.inevitable.value = ison1; |
| | | propertyBars.Add(propertyBar); |
| | | |
| | | propertyBar = new EquipTrainPropertyBar(data.config.attType2, data.config.attMax2, data.config.attCostMoney2, trainState); |
| | | propertyBar.propertyValue.value = trainedProperties.y; |
| | | propertyBar.deltaValue.value = unSavedProperties.y; |
| | | propertyBar.operateType.value = operateType; |
| | | propertyBar.inevitable.value = ison2; |
| | | propertyBars.Add(propertyBar); |
| | | |
| | | propertyBar = new EquipTrainPropertyBar(data.config.attType3, data.config.attMax3, data.config.attCostMoney3, trainState); |
| | | propertyBar.propertyValue.value = trainedProperties.z; |
| | | propertyBar.deltaValue.value = unSavedProperties.z; |
| | | propertyBar.operateType.value = operateType; |
| | | propertyBar.inevitable.value = ison3; |
| | | propertyBars.Add(propertyBar); |
| | | } |
| | | |