From fef7907ff2c043682d63ed667d139f8ffa1a2ff9 Mon Sep 17 00:00:00 2001
From: Client_PangDeRong <593317293@qq.com>
Date: 星期六, 24 十一月 2018 11:56:23 +0800
Subject: [PATCH] 4985 【前端】【1.3】装备合成需支持5个材料
---
System/Compose/New/ComposeEquipWin.cs | 40 ++++++++++++++++++++++++++++------------
1 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/System/Compose/New/ComposeEquipWin.cs b/System/Compose/New/ComposeEquipWin.cs
index 3fc2078..f079ce2 100644
--- a/System/Compose/New/ComposeEquipWin.cs
+++ b/System/Compose/New/ComposeEquipWin.cs
@@ -18,9 +18,14 @@
[SerializeField] GameObject increaseRateItem;
[SerializeField] GameObject increaseGridCell;
-
- [Header("鍥哄畾鐗╁搧鍜岄潪鍥哄畾鐗╁搧")]
- [SerializeField] List<ComposeMatCell> fixedAndUnfixeds = new List<ComposeMatCell>();
+
+ [SerializeField] GameObject three_ComposeEquip;
+ [SerializeField] GameObject five_ComposeEquip;
+ [Header("鍥哄畾鐗╁搧鍜屼笁涓潪鍥哄畾鐗╁搧")]
+ [SerializeField] List<ComposeMatCell> three_FixedAndUnfixeds = new List<ComposeMatCell>();
+ [Header("鍥哄畾鐗╁搧鍜屼簲涓潪鍥哄畾鐗╁搧")]
+ [SerializeField] List<ComposeMatCell> five_FixedAndUnfixeds = new List<ComposeMatCell>();
+
[Header("鍚堟垚鐗╁搧")]
[SerializeField] List<ComposeMatCell> makeItems = new List<ComposeMatCell>();
[Header("鎻愰珮鎴愬姛鐜�")]
@@ -47,9 +52,7 @@
[SerializeField]
GameObject chooseComposeEquip;
-
- [SerializeField]
- GameObject composeEquip;
+ [SerializeField] GameObject container_ComposeEquip;
[SerializeField] UIEffect composeEffect;
[SerializeField] UIEffect successEffect;
[SerializeField] UIEffect failEffect;
@@ -396,7 +399,7 @@
{
notChooseBG.SetActive(isShows[0]);
chooseComposeEquip.SetActive(isShows[1]);
- composeEquip.SetActive(isShows[2]);
+ container_ComposeEquip.SetActive(isShows[2]);
}
private void UpdateComposeMat()
@@ -417,21 +420,31 @@
int[] fixedIds = compoundModel.itemID;
int[] fixedDisplays = compoundModel.itemDisplay;
- int[] unfixedIds = compoundModel.unfixedItemID;
int[] unfixedDisplays = compoundModel.unfixedItemDisplay;
+ if(compoundModel.unfixedItemCount <= 3)
+ {
+ three_ComposeEquip.SetActive(true);
+ five_ComposeEquip.SetActive(false);
+ }
+ else
+ {
+ three_ComposeEquip.SetActive(false);
+ five_ComposeEquip.SetActive(true);
+ }
- for(int i = 0; i < fixedAndUnfixeds.Count; i++)
+ var fixedAndUnfixeds = compoundModel.unfixedItemCount > 3 ? five_FixedAndUnfixeds : three_FixedAndUnfixeds;
+ for (int i = 0; i < fixedAndUnfixeds.Count; i++)
{
var matCell = fixedAndUnfixeds[i];
matCell.SetDisplay(compoundModel, NeedMatType.Nothing, true);
}
- for(int i = 0; i < fixedDisplays.Length; i++)
+ for (int i = 0; i < fixedDisplays.Length; i++)
{
var fixedDisplay = fixedDisplays[i];
- if(fixedDisplay != 0)
+ if (fixedDisplay != 0)
{
- var matCell = fixedAndUnfixeds[fixedDisplay -1];
+ var matCell = fixedAndUnfixeds[fixedDisplay - 1];
int fixedId = 0;
composeWinModel.TryGetIdByDisplay(NeedMatType.fixedItem, compoundModel, fixedDisplay, out fixedId);
matCell.SetDisplay(compoundModel, NeedMatType.fixedItem, false, "", fixedId);
@@ -447,6 +460,7 @@
matCell.SetDisplay(compoundModel, NeedMatType.unfixedItem, false, UIHelper.ReplaceNewLine(Language.Get("ComposeWin_PutInText_2")));
}
}
+
int[] increases = compoundModel.successRateIncrease;
if (increases == null || increases.Length < 2)
@@ -608,6 +622,8 @@
var unfixedSelectItemDict = selectModel.GetUnfixedItemModel();
var unfixeAddDict = selectModel.GetHaveUnfixedSelectItem();
int[] unfixedDisplays = compoundModel.unfixedItemDisplay;
+ var fixedAndUnfixeds = compoundModel.unfixedItemCount > 3 ? five_FixedAndUnfixeds : three_FixedAndUnfixeds;
+
for (int i = 0; i < unfixedDisplays.Length; i++)
{
var unfixedDisplay = unfixedDisplays[i];
--
Gitblit v1.8.0