| Main/System/FuncPreset/FuncPresetChooseCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/FuncPreset/FuncPresetChooseCells.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/FuncPreset/FuncPresetChooseMoreCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/FuncPreset/FuncPresetManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Mingge/MinggeManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/System/FuncPreset/FuncPresetChooseCell.cs
@@ -17,6 +17,7 @@ [SerializeField] Button foldBtn; //折叠 [SerializeField] FuncPresetChooseCells pareant; [SerializeField] Image redImg; int curBattleType; public void Display(int battleType, int funcType, int id, bool isUnFold) @@ -35,14 +36,16 @@ caseNameText.text = data.PresetName; numUnFoldText.text = id.ToString(); changeNameBtn.AddListener(()=>ChangeName(funcType, id)); foldBtn.AddListener(()=>Fold(funcType, id)); changeNameBtn.AddListener(() => ChangeName(funcType, id)); foldBtn.AddListener(() => Fold(funcType, id)); } else { unFoldObj.SetActive(false); foldObj.SetActive(true); redImg.SetActive(FuncPresetManager.Instance.ShowRed(funcType, id)); unFoldBtn.AddListener(() => { if (id == selectID && pareant.unFoldID == 0) @@ -62,16 +65,17 @@ } } }); lockImg.SetActive(!data.unLock); numText.text = !data.unLock ? "" :id.ToString(); numText.text = !data.unLock ? "" : id.ToString(); selectImg.SetActive(selectID == id); } } void ChangeName(int funcType, int id) { UIManager.Instance.OpenWindow<FuncPresetChangeNameWin>(funcType*100 + id); Main/System/FuncPreset/FuncPresetChooseCells.cs
@@ -17,6 +17,8 @@ [SerializeField] HorizontalLayoutGroup layoutGroup; [SerializeField] FuncPresetChooseCell[] cells; [SerializeField] Button unFoldBtn; //展开更多 [SerializeField] Image redImg; //被选中的方案会显示在外层,如果不是第四个则第四个会显示在最上面 [SerializeField] Transform moreCellObj; @@ -91,6 +93,9 @@ } } redImg.SetActive(FuncPresetManager.Instance.GetNeedShowRedID(funcType) > 4); UIUtility.ForceRefreshLayout(this.transform).Forget(); } Main/System/FuncPreset/FuncPresetChooseMoreCell.cs
@@ -12,6 +12,7 @@ [SerializeField] Transform selectObj; //流派名才有选中,方案名选中后就显示在外层第四个 [SerializeField] FuncPresetChooseCells pareant; //记录展开的方案ID用于表现 [SerializeField] Transform moreCellObj; [SerializeField] Image redImg; public void Display(int battleType, int funcType, int id) { @@ -52,6 +53,7 @@ }); changeNameBtn.SetActive(false); chooseBtn.RemoveAllListeners(); redImg.SetActive(FuncPresetManager.Instance.ShowRed(funcType, id)); } selectObj?.SetActive(selectID == id); Main/System/FuncPreset/FuncPresetManager.cs
@@ -343,10 +343,49 @@ } else { UIManager.Instance.OpenWindow<FuncPresetWin>(battleType); } UIManager.Instance.OpenWindow<FuncPresetWin>(battleType); } } //功能类的满足条件后,提示红点手动解锁 // 某个方案是否要红点提示 public bool ShowRed(int funcType, int id) { if (funcType == (int)FuncPresetType.Mingge) { var presetData = GetFuncPreset(funcType, id); if (presetData.unLock) { return false; } var config = PresetUnlockConfig.GetPresetUnlockConfig(funcType, id); if (config != null && config.UnlockType == 2 && MinggeManager.Instance.m_GanwuLV < config.UnlockValue) { return false; } return true; } return false; } public int GetNeedShowRedID(int funcType) { if (funcType == (int)FuncPresetType.Mingge) { var maxCnt = PresetUnlockConfig.GetFuncPresetMaxCount(funcType); ; for (int i = 1; i <= maxCnt; i++) { if (ShowRed(funcType, i)) { return i; } } } return 0; } } Main/System/Mingge/MinggeManager.cs
@@ -43,6 +43,7 @@ PackManager.Instance.RefreshItemEvent += RefreshItemEvent; DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent += OnEquipResult; DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOK; FuncPresetManager.Instance.OnFuncPresetUseDataEvent += OnFuncPresetUseDataEvent; ParseConfig(); } @@ -52,6 +53,7 @@ PackManager.Instance.RefreshItemEvent -= RefreshItemEvent; DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent -= OnEquipResult; DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= OnPlayerLoginOK; FuncPresetManager.Instance.OnFuncPresetUseDataEvent -= OnFuncPresetUseDataEvent; } @@ -139,11 +141,22 @@ public void UpdateMinggeInfo(HB132_tagSCMinggeInfo netPack) { var beforeLV= m_GanwuLV; m_GanwuLV = netPack.GanwuLV; m_GanwuExp = (int)netPack.GanwuExp; m_Lingying = (int)netPack.Lingying; if (beforeLV != m_GanwuLV) { UpdateRedPoint(); beforeLV = m_GanwuLV; } OnMinggeInfoUpdate?.Invoke(); } void OnFuncPresetUseDataEvent(int type) { UpdateRedPoint(); } @@ -319,12 +332,14 @@ Redpoint tmpRP = new Redpoint(MainRedDot.MainAffairsRedpoint, MainRedDot.RedPoint_Mingge); Redpoint redpointMG = new Redpoint(MainRedDot.RedPoint_Mingge, MainRedDot.RedPoint_Mingge * 10 + 1); Redpoint redpointPray = new Redpoint(MainRedDot.RedPoint_Mingge, MainRedDot.RedPoint_Mingge * 10 + 2); Redpoint redpointPreset = new Redpoint(MainRedDot.RedPoint_Mingge, MainRedDot.RedPoint_Mingge * 10 + 3); void UpdateRedPoint() { redpointMG.state = RedPointState.None; redpointPray.state = RedPointState.None; redpointPreset.state = RedPointState.None; if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Mingge)) { return; @@ -338,6 +353,10 @@ { redpointPray.state = RedPointState.Simple; } if (FuncPresetManager.Instance.GetNeedShowRedID((int)FuncPresetType.Mingge) != 0) { redpointPreset.state = RedPointState.Simple; } } #endregion