| | |
| | | [SerializeField] GameObject costMoneyObj;
|
| | | [SerializeField] Button composeBtn;
|
| | | [SerializeField] Button allComposeBtn;
|
| | | [SerializeField] UIEffect composeEffect;
|
| | | [SerializeField] UIEffect twoMatComposeEffect;
|
| | | [SerializeField] UIEffect oneMatComposeEffect;
|
| | | [Header("一个固定物品和非固定物品")]
|
| | | [SerializeField] List<ComposeMatCell> oneMatFixedAndUnfixeds = new List<ComposeMatCell>();
|
| | | [Header("非一个固定物品和非固定物品")]
|
| | | [SerializeField] List<ComposeMatCell> twoMatFixedAndUnfixeds = new List<ComposeMatCell>();
|
| | | [Header("合成物品")]
|
| | | [SerializeField] List<ComposeMatCell> makeItems = new List<ComposeMatCell>();
|
| | | [SerializeField]
|
| | | List<GameObject> sourceItemlist = new List<GameObject>();
|
| | |
|
| | | [SerializeField]
|
| | | List<GameObject> previewItemlist = new List<GameObject>();
|
| | |
|
| | | |
| | | |
| | | 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 _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
|
| | | }
|
| | |
|
| | | 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;
|
| | | ComposeWinModel.ComposeFirstTypeData firstTypeData;
|
| | | ComposeWinModel.ComposeSecondTypeData secondTypeData;
|
| | | ComposeWinModel.ComposeThirdTypeData thirdTypeData;
|
| | |
| | | private int preSecondType = 0;
|
| | | [SerializeField] int initSuccessRate = 10000;
|
| | | ItemCompoundConfig compoundModel = null;
|
| | |
|
| | | SelectEquipModel _selectModel;
|
| | | private Dictionary<int,List<int>> fixedItemIndexDict = new Dictionary<int, List<int>>();
|
| | |
|
| | | SelectEquipModel selectModel
|
| | | {
|
| | | get { return _selectModel ?? (_selectModel = ModelCenter.Instance.GetModel<SelectEquipModel>()); }
|
| | | }
|
| | |
|
| | | AchievementGuideEffect guidEffect = null;
|
| | |
|
| | | protected override void BindController()
|
| | |
| | |
|
| | | _moneyCountText.text = modelInterface.OnChangeCoinsUnit((ulong)compoundModel.money);
|
| | | }
|
| | |
|
| | | private UIEffect GetPlayMatEffect()
|
| | | {
|
| | | if (compoundModel == null) return null;
|
| | |
|
| | | int[] fixedIds = compoundModel.itemID;
|
| | | if(fixedIds != null)
|
| | | {
|
| | | if(fixedIds.Length < 2)
|
| | | {
|
| | | return oneMatComposeEffect;
|
| | | }
|
| | | else
|
| | | {
|
| | | return twoMatComposeEffect;
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | | #endregion
|
| | | private void ResetModel()
|
| | | {
|
| | |
| | | break;
|
| | | }
|
| | | }
|
| | | composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict, composeEffect, composeCnt);
|
| | | composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict,GetPlayMatEffect(), composeCnt);
|
| | | }
|
| | |
|
| | | private void OnClickComposeBtn()
|
| | |
| | | if (compoundModel == null) return;
|
| | |
|
| | | SetFixedItemIndexDic();
|
| | | composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict,composeEffect,1);
|
| | | composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict,GetPlayMatEffect(),1);
|
| | | }
|
| | |
|
| | | private void SetFixedItemIndexDic()
|
| | |
| | | }
|
| | |
|
| | | RefreshUI(compoundModel);
|
| | | selectModel.ClearSelectModel();
|
| | | }
|
| | | }
|
| | | }
|