| | |
| | | [SerializeField] Image tyItemImg; |
| | | [SerializeField] Text tyItemCntText; |
| | | |
| | | |
| | | FuncPresetChooseCells presetChooseCells; |
| | | int lastLV = 0; |
| | | int lastExp = 0; |
| | | protected override void InitComponent() |
| | | { |
| | | var presetObj = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells"); |
| | | presetObj.transform.SetParentEx(caseesObj, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | presetChooseCells = presetObj.GetComponent<FuncPresetChooseCells>(); |
| | | seeAttrBtn.AddListener(() => |
| | | { |
| | | AttributeManager.Instance.OpenTotalAttributeWin(MinggeManager.Instance.minggeAttrDict); |
| | |
| | | ClickSuite(index); |
| | | }); |
| | | } |
| | | prayBtn.AddListener(()=> |
| | | { |
| | | UIManager.Instance.OpenWindow<MinggePrayWin>(); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | PackManager.Instance.DeleteItemEvent += DeleteDropItem; |
| | | MinggeManager.Instance.OnMinggeInfoUpdate += OnMinggeInfoUpdate; |
| | | UIManager.Instance.OnCloseWindow += OnCloseWindow; |
| | | FuncPresetManager.Instance.OnFuncPresetUseDataEvent += OnFuncPresetUseDataEvent; |
| | | lastLV = MinggeManager.Instance.m_GanwuLV; |
| | | lastExp = MinggeManager.Instance.m_GanwuExp; |
| | | Display(); |
| | |
| | | PackManager.Instance.DeleteItemEvent -= DeleteDropItem; |
| | | MinggeManager.Instance.OnMinggeInfoUpdate -= OnMinggeInfoUpdate; |
| | | UIManager.Instance.OnCloseWindow -= OnCloseWindow; |
| | | FuncPresetManager.Instance.OnFuncPresetUseDataEvent -= OnFuncPresetUseDataEvent; |
| | | } |
| | | |
| | | void OnCloseWindow(UIBase win) |
| | |
| | | } |
| | | } |
| | | |
| | | void OnFuncPresetUseDataEvent() |
| | | { |
| | | MinggeManager.Instance.RefrehMinggeAttrs(); |
| | | Display(); |
| | | } |
| | | |
| | | void Display() |
| | | { |
| | | DisplayMGGanwu(); |
| | |
| | | |
| | | DisplayCostItem(); |
| | | moneyMoveByPathCell.SetActive(false); |
| | | presetChooseCells.Display((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge); |
| | | } |
| | | void RefreshItemEvent(PackType type, int index, int itemID) |
| | | { |
| | |
| | | |
| | | void SendTuiyan() |
| | | { |
| | | MinggeManager.Instance.SendTY(1); |
| | | if (MinggeManager.Instance.CalcEquip()) |
| | | { |
| | | return; |
| | | } |
| | | tyEffect.onComplete += () => |
| | | { |
| | | MinggeManager.Instance.SendTY(1); |
| | | }; |
| | | tyEffect.Play(); |
| | | } |
| | | |
| | |
| | | void OnMinggeInfoUpdate() |
| | | { |
| | | DisplayMGGanwu(); |
| | | presetChooseCells.Display((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge); |
| | | } |
| | | |
| | | void DisplayMGGanwu() |