| | |
| | | UIEventTrigger.Get(helpBtn.gameObject).OnUp = OnDownUp;
|
| | | successRate = 0;
|
| | | firstTypeDict = composeWinModel.GetFirstTypeModel((int)ComposeFuncType.Equip);
|
| | | CreateCell();
|
| | | if(curSecondType == 0)
|
| | | |
| | | bool isJumpTo = false;
|
| | | if (composeWinModel.secondType != 0)
|
| | | {
|
| | | RefreshUI(null);
|
| | | isJumpTo = true;
|
| | | curSecondType = composeWinModel.secondType;
|
| | | curThirdType = composeWinModel.thirdType;
|
| | | secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Equip, composeWinModel.secondType);
|
| | | OnClickSecondType(curSecondType,curThirdType);
|
| | | composeWinModel.ResetJumpToModel();
|
| | | }
|
| | |
|
| | | CreateCell();
|
| | | if (compoundModel != null)
|
| | | {
|
| | | RefreshUI(compoundModel);
|
| | | if (isJumpTo)
|
| | | {
|
| | | isJumpTo = false;
|
| | | if (!composeWinModel.IsEnoughFixedMat(compoundModel) || !composeWinModel.IsEnoughUnfixedMat(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
|
| | | }
|
| | | else if (!composeWinModel.IsEnoughMoney(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Z1011"));
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | RefreshUI(null);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (secondTypeDict != null)
|
| | | {
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0
|
| | | && curThirdType == 1)
|
| | | && curThirdType >= 1)
|
| | | {
|
| | | int remain = curSecondType - firstTypeDict.Count;
|
| | | if(remain > 0)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickSecondType(int secondType)
|
| | | private void OnClickSecondType(int secondType,int _thirdType = 0)
|
| | | {
|
| | | curSecondType = secondType;
|
| | | secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Equip, curSecondType);
|
| | |
|
| | | foreach (var thirdType in secondTypeDict.Keys)
|
| | | if(_thirdType == 0)
|
| | | {
|
| | | if (thirdType != 0)
|
| | | foreach (var thirdType in secondTypeDict.Keys)
|
| | | {
|
| | |
|
| | | if (preSecondType == curSecondType)
|
| | | if (thirdType != 0)
|
| | | {
|
| | | curSecondType = 0;
|
| | | preSecondType = 0;
|
| | | if (preSecondType == curSecondType)
|
| | | {
|
| | | curSecondType = 0;
|
| | | preSecondType = 0;
|
| | | }
|
| | | curThirdType = thirdType;
|
| | | }
|
| | | curThirdType = thirdType;
|
| | | else
|
| | | {
|
| | | curThirdType = 0;
|
| | | }
|
| | | break;
|
| | | }
|
| | | else
|
| | | {
|
| | | curThirdType = 0;
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | else
|
| | | {
|
| | | curThirdType = _thirdType;
|
| | | }
|
| | | |
| | | if (preSecondType != curSecondType)
|
| | | {
|
| | | preSecondType = curSecondType;
|