| New file |
| | |
| | | using Snxxz.UI;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class ComposeDogzEquipWin : Window
|
| | | {
|
| | | [SerializeField]
|
| | | ScrollerController cellCtrl;
|
| | |
|
| | | [SerializeField]
|
| | | List<GameObject> sourceItemlist = new List<GameObject>();
|
| | |
|
| | | [SerializeField]
|
| | | List<GameObject> previewItemlist = new List<GameObject>();
|
| | |
|
| | | [SerializeField]
|
| | | Text successRateText;
|
| | |
|
| | | [SerializeField]
|
| | | Button helpBtn;
|
| | |
|
| | | [SerializeField]
|
| | | Button composeBtn;
|
| | |
|
| | | [SerializeField]
|
| | | Button onekeyPutBtn;
|
| | |
|
| | | [SerializeField]
|
| | | GameObject notChooseBG;
|
| | | [SerializeField]
|
| | | GameObject composeEquip;
|
| | | [SerializeField] UIEffect composeEffect;
|
| | | [SerializeField] UIEffect successEffect;
|
| | | [SerializeField] UIEffect failEffect;
|
| | |
|
| | | ComposeWinModel _composeWinModel;
|
| | | ComposeWinModel composeWinModel
|
| | | {
|
| | | get { return _composeWinModel ?? (_composeWinModel = ModelCenter.Instance.GetModel<ComposeWinModel>()); }
|
| | | }
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack
|
| | | {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
|
| | | }
|
| | |
|
| | | GetItemPathModel ItemPathModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); }
|
| | | }
|
| | |
|
| | |
|
| | | private Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> firstTypeDict = null;
|
| | | private Dictionary<int, List<ItemCompoundConfig>> secondTypeDict = null;
|
| | | private List<ItemCompoundConfig> thirdTypelist = null;
|
| | |
|
| | | Dictionary<int, List<int>> fixedItemIndexDict = new Dictionary<int, List<int>>();
|
| | |
|
| | | private int curSecondType = 0;
|
| | | private int curThirdType = 0;
|
| | | private int preSecondType = 0;
|
| | | private int preThirdType = 0;
|
| | | [SerializeField] int initSuccessRate = 0;
|
| | | ItemCompoundConfig compoundModel = null;
|
| | | int successRate = 0;
|
| | | SelectEquipModel _selectModel;
|
| | | SelectEquipModel selectModel |
| | | {
|
| | | get { return _selectModel ?? (_selectModel = ModelCenter.Instance.GetModel<SelectEquipModel>()); }
|
| | | }
|
| | | protected override void BindController()
|
| | | {
|
| | | cellCtrl.OnRefreshCell += RefreshCell;
|
| | | cellCtrl.vertical = true;
|
| | | cellCtrl.lockType = EnhanceLockType.KeepVertical;
|
| | | composeWinModel.ResetModelEvent += ResetModel;
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | composeBtn.AddListener(OnClickComposeBtn);
|
| | | onekeyPutBtn.AddListener(OnClickOnekeyPutBtn);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | selectModel.selectEquipEvent += RefreshSelectItem;
|
| | | DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent += OnComposeAnswer;
|
| | | UIEventTrigger.Get(helpBtn.gameObject).OnDown = OnClickHelpBtn;
|
| | | UIEventTrigger.Get(helpBtn.gameObject).OnUp = OnDownUp;
|
| | | successRate = 0;
|
| | | composeWinModel.funcType = ComposeFuncType.MountDogz;
|
| | | firstTypeDict = composeWinModel.GetFirstTypeModel();
|
| | | CreateCell();
|
| | | if(curSecondType == 0)
|
| | | {
|
| | | RefreshUI(null);
|
| | | }
|
| | | if (compoundModel != null)
|
| | | {
|
| | | RefreshUI(compoundModel);
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | this.transform.SetAsLastSibling();
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | selectModel.selectEquipEvent -= RefreshSelectItem;
|
| | | DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent -= OnComposeAnswer;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void ResetModel()
|
| | | {
|
| | | curSecondType = 0;
|
| | | curThirdType = 0;
|
| | | preSecondType = 0;
|
| | | preThirdType = 0;
|
| | | compoundModel = null;
|
| | | }
|
| | |
|
| | | private void CreateCell()
|
| | | {
|
| | | cellCtrl.Refresh();
|
| | |
|
| | | if(curSecondType == 0)
|
| | | {
|
| | | ChangeUIState(true, false);
|
| | | }
|
| | |
|
| | | if(firstTypeDict != null)
|
| | | {
|
| | | foreach (int secondType in firstTypeDict.Keys)
|
| | | {
|
| | | cellCtrl.AddCell(ScrollerDataType.Header,secondType);
|
| | | if(secondType == curSecondType)
|
| | | {
|
| | | foreach (int thirdType in firstTypeDict[secondType].Keys)
|
| | | {
|
| | | if (thirdType != 0)
|
| | | {
|
| | | cellCtrl.AddCell(ScrollerDataType.Normal, thirdType);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | cellCtrl.Restart();
|
| | |
|
| | | if (secondTypeDict != null)
|
| | | {
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0
|
| | | && curThirdType == 1)
|
| | | {
|
| | | cellCtrl.JumpIndex(curSecondType - 1);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | Image icon = cell.transform.Find("BtnIcon").GetComponent<Image>();
|
| | | Text name = cell.transform.Find("BtnText").GetComponent<Text>();
|
| | | Button cellBtn = cell.GetComponent<Button>();
|
| | | cellBtn.RemoveAllListeners();
|
| | | ItemCompoundConfig compoundModel = null;
|
| | | switch (type)
|
| | | {
|
| | | case ScrollerDataType.Header:
|
| | | GameObject arrowIcon = cell.transform.Find("SecondBtn").gameObject;
|
| | | foreach (int thirdType in firstTypeDict[cell.index].Keys)
|
| | | {
|
| | | if (thirdType != 0)
|
| | | {
|
| | | arrowIcon.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | arrowIcon.SetActive(false);
|
| | | }
|
| | |
|
| | | compoundModel = firstTypeDict[cell.index][thirdType][0];
|
| | | name.text = compoundModel.secondTypeName;
|
| | | if (curSecondType == cell.index)
|
| | | {
|
| | | arrowIcon.transform.localRotation = Quaternion.Euler(0, 0, -90);
|
| | | icon.SetSprite("ComposeFirstClassChoosebtn");
|
| | | secondTypeDict = composeWinModel.GetSecondTypeModel(curSecondType);
|
| | | }
|
| | | else
|
| | | {
|
| | | arrowIcon.transform.localRotation = Quaternion.Euler(0, 0,0);
|
| | | icon.SetSprite("ComposeFirstClassNormalbtn");
|
| | | }
|
| | | break;
|
| | | }
|
| | | cellBtn.AddListener(()=> { OnClickSecondType(cell.index); });
|
| | | break;
|
| | | case ScrollerDataType.Normal:
|
| | | compoundModel = secondTypeDict[cell.index][0];
|
| | | name.text = compoundModel.thirdTypeName;
|
| | | if (curThirdType == cell.index)
|
| | | {
|
| | | icon.SetSprite("ChildListBtn_Select");
|
| | | thirdTypelist = composeWinModel.GetThirdTypeModellist(cell.index);
|
| | | RefreshUI(compoundModel);
|
| | | }
|
| | | else
|
| | | {
|
| | | icon.SetSprite("ChildListBtn_UnSelect");
|
| | | }
|
| | | cellBtn.AddListener(() => { OnClickThirdType(cell.index); });
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickSecondType(int secondType)
|
| | | {
|
| | | curSecondType = secondType;
|
| | | secondTypeDict = composeWinModel.GetSecondTypeModel(curSecondType);
|
| | |
|
| | | foreach (var thirdType in secondTypeDict.Keys)
|
| | | {
|
| | | if (thirdType != 0)
|
| | | {
|
| | |
|
| | | if (preSecondType == curSecondType)
|
| | | {
|
| | | curSecondType = 0;
|
| | | preSecondType = 0;
|
| | | }
|
| | | curThirdType = thirdType;
|
| | | }
|
| | | else
|
| | | {
|
| | | curThirdType = 0;
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | if (preSecondType != curSecondType)
|
| | | {
|
| | | preSecondType = curSecondType;
|
| | | selectModel.ClearSelectModel();
|
| | | }
|
| | | |
| | | CreateCell();
|
| | | }
|
| | |
|
| | | private void OnClickThirdType(int thirdType)
|
| | | {
|
| | | curThirdType = thirdType;
|
| | | if (preThirdType != curThirdType)
|
| | | {
|
| | | preThirdType = curThirdType;
|
| | | }
|
| | | CreateCell();
|
| | | selectModel.ClearSelectModel();
|
| | | }
|
| | |
|
| | | private void ChangeUIState(params bool[] isShows)
|
| | | {
|
| | | notChooseBG.SetActive(isShows[0]);
|
| | | composeEquip.SetActive(isShows[1]);
|
| | | }
|
| | |
|
| | | private void RefreshUI(ItemCompoundConfig compoundModel)
|
| | | {
|
| | | this.compoundModel = compoundModel;
|
| | |
|
| | | if (compoundModel == null)
|
| | | {
|
| | | ChangeUIState(true, false);
|
| | | int i = 0;
|
| | | for (i = 0; i < previewItemlist.Count; i++)
|
| | | {
|
| | | GameObject gridCell = previewItemlist[i].transform.Find("GridCell").gameObject;
|
| | | gridCell.SetActive(false);
|
| | | }
|
| | |
|
| | | for (i = 0; i < sourceItemlist.Count; i++)
|
| | | {
|
| | | GameObject gridCell = sourceItemlist[i].transform.Find("GridCell").gameObject;
|
| | | Text putInText = sourceItemlist[i].transform.Find("PutInText").GetComponent<Text>();
|
| | | Button posBtn = sourceItemlist[i].GetComponent<Button>();
|
| | | posBtn.RemoveAllListeners();
|
| | | putInText.gameObject.SetActive(false);
|
| | | RefreshGridCellUI(gridCell, true);
|
| | | }
|
| | | composeBtn.gameObject.SetActive(false);
|
| | | onekeyPutBtn.gameObject.SetActive(false);
|
| | | |
| | | }
|
| | | else
|
| | | {
|
| | | ChangeUIState(false, true);
|
| | | composeWinModel.SetCurComposeModel(compoundModel);
|
| | | composeBtn.gameObject.SetActive(true);
|
| | | onekeyPutBtn.gameObject.SetActive(true);
|
| | | ControllerRightUI();
|
| | | }
|
| | |
|
| | | RefreshComposeSuccessRate();
|
| | | }
|
| | |
|
| | | private void ControllerRightUI()
|
| | | {
|
| | |
|
| | | int i = 0;
|
| | | #region 合成物品UI
|
| | | for (i = 0; i < previewItemlist.Count; i++)
|
| | | {
|
| | | GameObject gridCell = previewItemlist[i].transform.Find("GridCell").gameObject;
|
| | | if (i < composeWinModel.makeIDs.Length)
|
| | | {
|
| | | RefreshGridCellUI(gridCell, false, composeWinModel.makeIDs[i],NeedMatType.MakeItem);
|
| | | }
|
| | | else
|
| | | {
|
| | | RefreshGridCellUI(gridCell,true);
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 固定道具和不固定道具UI
|
| | |
|
| | | for(i = 0;i < sourceItemlist.Count; i++)
|
| | | {
|
| | | GameObject gridCell = sourceItemlist[i].transform.Find("GridCell").gameObject;
|
| | | Text putInText = sourceItemlist[i].transform.Find("PutInText").GetComponent<Text>();
|
| | | Button posBtn = sourceItemlist[i].GetComponent<Button>();
|
| | | putInText.gameObject.SetActive(false);
|
| | | RefreshGridCellUI(gridCell, true);
|
| | | posBtn.RemoveAllListeners();
|
| | | }
|
| | | fixedItemIndexDict.Clear();
|
| | | for (i = 0; i < composeWinModel.fixedItemDisplay.Length; i++)
|
| | | {
|
| | | if (composeWinModel.fixedItemDisplay[i] != 0)
|
| | | {
|
| | | GameObject matPos = sourceItemlist[composeWinModel.fixedItemDisplay[i] - 1];
|
| | | GameObject gridCell = matPos.transform.Find("GridCell").gameObject;
|
| | | Text putInText = matPos.transform.Find("PutInText").GetComponent<Text>();
|
| | | putInText.gameObject.SetActive(false);
|
| | | RefreshGridCellUI(gridCell,false,composeWinModel.costfixedItemIDs[i],NeedMatType.fixedItem);
|
| | | |
| | | List<int> itemIndexlist = null;
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack != null)
|
| | | {
|
| | | itemIndexlist = singlePack.ItemIndexlist(composeWinModel.costfixedItemIDs[i], composeWinModel.costfixedItemCounts[i]);
|
| | | }
|
| | | if (itemIndexlist != null)
|
| | | {
|
| | | fixedItemIndexDict.Add(composeWinModel.costfixedItemIDs[i], itemIndexlist);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | for (i = 0; i < composeWinModel.unfixedItemDisplay.Length; i++)
|
| | | {
|
| | | if (composeWinModel.unfixedItemDisplay[i] != 0)
|
| | | {
|
| | | GameObject matPos = sourceItemlist[composeWinModel.unfixedItemDisplay[i] - 1];
|
| | | GameObject gridCell = matPos.transform.Find("GridCell").gameObject;
|
| | | Text putInText = matPos.transform.Find("PutInText").GetComponent<Text>();
|
| | | Button posBtn = matPos.GetComponent<Button>();
|
| | | putInText.gameObject.SetActive(true);
|
| | | RefreshGridCellUI(gridCell, false);
|
| | | posBtn.RemoveAllListeners();
|
| | | posBtn.AddListener(()=> {
|
| | | selectModel.SetAddParent(matPos);
|
| | | selectModel.selectItem = SelectItemType.unfixed;
|
| | | WindowCenter.Instance.Open<SelectItemWin>();
|
| | | });
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | }
|
| | |
|
| | | private void RefreshGridCellUI(GameObject gridCell, bool islock, int itemId = -1,NeedMatType matType = NeedMatType.Nothing,int itemPlace = -1)
|
| | | {
|
| | | gridCell.SetActive(true);
|
| | | ItemCell itemCell = gridCell.transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | if (itemCell == null)
|
| | | itemCell = gridCell.transform.Find("ItemCell").gameObject.AddComponent<ItemCell>();
|
| | |
|
| | | GameObject gridlock = gridCell.transform.Find("GridLock").gameObject;
|
| | | itemCell.cellBtn.onClick.RemoveAllListeners();
|
| | | if (islock)
|
| | | {
|
| | | gridlock.gameObject.SetActive(true);
|
| | | itemCell.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | gridlock.gameObject.SetActive(false);
|
| | | itemCell.gameObject.SetActive(true);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem,itemPlace);
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(itemId);
|
| | | if (itemModel == null)
|
| | | {
|
| | | if(itemId != -1)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.onClick.AddListener(() =>
|
| | | {
|
| | | if (matType == NeedMatType.fixedItem)
|
| | | {
|
| | | if (itemConfig.GetWay != null && itemConfig.GetWay.Length > 0)
|
| | | {
|
| | | ItemPathModel.SetChinItemModel(itemId);
|
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, true);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, true);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | | );
|
| | | }
|
| | | else
|
| | | {
|
| | | itemCell.gameObject.SetActive(false);
|
| | | }
|
| | | |
| | | }
|
| | | else
|
| | | {
|
| | | itemCell.Init(itemModel);
|
| | | |
| | | itemCell.cellBtn.onClick.AddListener(() =>
|
| | | {
|
| | | if (matType == NeedMatType.fixedItem)
|
| | | {
|
| | | if (itemConfig.GetWay != null && itemConfig.GetWay.Length > 0)
|
| | | {
|
| | | ItemPathModel.SetChinItemModel(itemId);
|
| | | }
|
| | | else
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.rptItem, itemModel.itemInfo.ItemGUID);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.rptItem, itemModel.itemInfo.ItemGUID);
|
| | | }
|
| | | });
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | if (matType == NeedMatType.fixedItem)
|
| | | {
|
| | | itemCell.countText.gameObject.SetActive(true);
|
| | | int haveCount = playerPack.GetItemCountByID(PackType.rptItem,itemId);
|
| | | int i = 0;
|
| | | for(i = 0; i < composeWinModel.costfixedItemIDs.Length; i++)
|
| | | {
|
| | | if(composeWinModel.costfixedItemIDs[i] == itemId)
|
| | | {
|
| | | if (haveCount >= composeWinModel.costfixedItemCounts[i])
|
| | | {
|
| | | itemCell.countText.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Green,haveCount.ToString()),
|
| | | "/",composeWinModel.costfixedItemCounts[i].ToString());
|
| | | }
|
| | | else
|
| | | {
|
| | | itemCell.countText.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Red, haveCount.ToString()),
|
| | | "/", composeWinModel.costfixedItemCounts[i].ToString());
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | else
|
| | | {
|
| | | itemCell.countText.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshSelectItem(ItemModel model, GameObject go, SelectItemType selectType)
|
| | | {
|
| | | GameObject gridCell = go.transform.Find("GridCell").gameObject;
|
| | | ItemCell itemCell = gridCell.transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | Text putInText = null;
|
| | | switch (selectType)
|
| | | {
|
| | | case SelectItemType.unfixed:
|
| | | putInText = go.transform.Find("PutInText").GetComponent<Text>();
|
| | | RefreshGridCellUI(gridCell, false, model.itemInfo.ItemID, NeedMatType.unfixedItem, model.itemInfo.ItemPlace);
|
| | | break;
|
| | | case SelectItemType.addons:
|
| | | putInText = go.transform.Find("AddRateText").GetComponent<Text>();
|
| | | RefreshGridCellUI(gridCell, false, model.itemInfo.ItemID, NeedMatType.addItem, model.itemInfo.ItemPlace);
|
| | | break;
|
| | | }
|
| | |
|
| | | itemCell.reducebtn.gameObject.SetActive(true);
|
| | | itemCell.reducebtn.RemoveAllListeners();
|
| | |
|
| | | itemCell.reducebtn.AddListener(() => { OnClickReduceBtn(gridCell, putInText,model.itemInfo.ItemPlace, selectType); });
|
| | | putInText.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | private void OnClickReduceBtn(GameObject gridCell,Text posDes,int itemPlace,SelectItemType selectItem)
|
| | | {
|
| | | switch (selectItem)
|
| | | {
|
| | | case SelectItemType.unfixed:
|
| | | selectModel.RemoveHaveUnfixedSelectItem(itemPlace);
|
| | | break;
|
| | | case SelectItemType.addons:
|
| | | selectModel.RemoveHaveAddSelectItem(itemPlace);
|
| | | break;
|
| | | }
|
| | |
|
| | | posDes.gameObject.SetActive(true);
|
| | | RefreshGridCellUI(gridCell,false,-1,NeedMatType.unfixedItem);
|
| | | }
|
| | |
|
| | | public void RefreshComposeSuccessRate()
|
| | | {
|
| | | successRate = 0;
|
| | | if (compoundModel != null)
|
| | | {
|
| | | successRate = compoundModel.successRate;
|
| | | }
|
| | | successRateText.text = Language.Get("HallowsWin_Success", StringUtility.Contact(successRate / 100, "%"));
|
| | | }
|
| | |
|
| | | private void OnClickOnekeyPutBtn()
|
| | | {
|
| | | if (compoundModel == null)
|
| | | return;
|
| | |
|
| | | Dictionary<int,ItemModel> unfixedSelectItemDict = selectModel.GetUnfixedItemModel();
|
| | | int i = 0;
|
| | | for (i = 0; i <sourceItemlist.Count; i++)
|
| | | {
|
| | | GameObject gridCell = sourceItemlist[i].transform.Find("GridCell").gameObject;
|
| | | ItemCell itemCell = gridCell.transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | GameObject gridlock = gridCell.transform.Find("GridLock").gameObject;
|
| | | foreach (int key in unfixedSelectItemDict.Keys)
|
| | | {
|
| | | if(gridCell.activeInHierarchy && !gridlock.activeInHierarchy |
| | | && !itemCell.gameObject.activeInHierarchy)
|
| | | {
|
| | |
|
| | | if (!selectModel.GetHaveUnfixedSelectItem().ContainsKey(key))
|
| | | {
|
| | | selectModel.AddHaveUnfixedSelectItem(key);
|
| | | RefreshSelectItem(unfixedSelectItemDict[key], sourceItemlist[i],SelectItemType.unfixed);
|
| | | break;
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickComposeBtn()
|
| | | {
|
| | | composeWinModel.SendComposeRequest(compoundModel,fixedItemIndexDict,composeEffect,1);
|
| | | }
|
| | |
|
| | | private void OnComposeAnswer(HA814_tagMCMakeItemAnswer answer)
|
| | | {
|
| | | if (answer.MakeType != (int)MakeType.Def_mitItemCompound)
|
| | | return;
|
| | |
|
| | | if (answer.Result == 1)
|
| | | {
|
| | | successEffect.Play();
|
| | | }
|
| | | else
|
| | | {
|
| | | failEffect.Play();
|
| | | }
|
| | |
|
| | | RefreshUI(compoundModel);
|
| | | selectModel.ClearSelectModel();
|
| | | }
|
| | |
|
| | | private void OnDownUp(GameObject go)
|
| | | {
|
| | | WindowCenter.Instance.Close<ComposeHelpWin>();
|
| | | }
|
| | |
|
| | | private void OnClickHelpBtn(GameObject go)
|
| | | {
|
| | | if (compoundModel != null)
|
| | | {
|
| | | WindowCenter.Instance.Open<ComposeHelpWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|