private void RefreshBar() { int left = data.GetCurrentLevelExp() + swallowExp; int right = 0; IntentifyEquipInfo next = moduleEquip.GetIntentifyInfo(equipType, data.GetIntentyLevel() + 1); IntentifyEquipInfo current = moduleEquip.GetIntentifyInfo(equipType, data.GetIntentyLevel()); if (next == null) { next = moduleEquip.GetIntentifyInfo(equipType, data.GetIntentyLevel() - 1); right = current.exp - next.exp; Util.SetText(m_expText, Util.Format(ConfigText.GetDefalutString(TextForMatType.EquipIntentyUI, 16), left, right)); Util.SetExpBar(m_expBars, 0, left, right); } else { right = next.exp - (current == null ? 0 : current.exp); int deltaLevel = m_previewIntentifyInfo == null ? 0 : m_previewIntentifyInfo.level - data.GetIntentyLevel(); if (deltaLevel < 0) { deltaLevel = 0; } Util.SetText(m_expText, Util.Format(ConfigText.GetDefalutString(TextForMatType.EquipIntentyUI, 16), left, right)); Util.SetExpBar(m_expBars, deltaLevel, left, right); } }
private void PreparePrevirewData() { int maxlevel = moduleEquip.GetMaxIntenLevel(equipType); m_maxLevel = data.GetIntentyLevel() >= maxlevel; m_maxLimitIntentifyInfo = moduleEquip.GetLimitIntenInfo(equipType, data.GetIntentyLevel(), data.HasEvolved()); m_previewIntentifyInfo = null; }
public void RefreshTotalExp() { List <int> expDetails = Module_Equip.GetReallyExpDetail(data.GetCurrentTotalExp(), m_swallowExp, m_maxLimitIntentifyInfo); int totalExp = expDetails.GetValue(0); m_swallowExp = expDetails.GetValue(1); m_swallowText.text = m_swallowExp.ToString(); m_previewIntentifyInfo = moduleEquip.GetLimitIntenLevelByExp(equipType, data.GetIntentyLevel(), totalExp, data.HasEvolved()); RefreshCoinCost(totalExp); }
public void RefreshPanel(PItem data, EquipType type, Dictionary <PItem, int> currentSelect, List <PItem> items) { this.data = data; equipType = type; SetPanelVisible(true); InitSelectData(currentSelect, items); m_dataSource?.SetItems(items); m_dataSource?.UpdateItems(); m_limitIntentifyInfo = moduleEquip.GetLimitIntenInfo(equipType, data.GetIntentyLevel(), data.HasEvolved()); RefreshDetail(); }
private void RefreshLevelUpExp() { IntentifyEquipInfo info = moduleEquip.GetIntentifyInfo(equipType, m_cacheLevel); IntentifyEquipInfo nextInfo = moduleEquip.GetIntentifyInfo(equipType, m_cacheLevel + 1); IntentifyEquipInfo lastInfo = moduleEquip.GetIntentifyInfo(equipType, m_cacheLevel - 1); //max level if (nextInfo == null) { m_cacheLevelUpExp = info.exp - lastInfo.exp; } else { m_cacheLevelUpExp = nextInfo.exp - (info == null ? 0 : info.exp); } }
private void RefreshDetail() { RefreshSwallowDisplay(); List <int> expDetails = Module_Equip.GetReallyExpDetail(data.GetCurrentTotalExp(), swallowExp, m_limitIntentifyInfo); totalExp = expDetails.GetValue(0); swallowExp = expDetails.GetValue(1); Util.SetText(m_swallowExpText, Util.Format(ConfigText.GetDefalutString(TextForMatType.EquipIntentyUI, 15), swallowExp)); m_previewIntentifyInfo = moduleEquip.GetLimitIntenLevelByExp(equipType, data.GetIntentyLevel(), totalExp, data.HasEvolved()); int level = data.GetIntentyLevel(); int nextLevel = m_previewIntentifyInfo == null ? level : m_previewIntentifyInfo.level; m_levelPreview.RefreshDetail(level, nextLevel, false); RefreshBar(); RefreshCoinCost(totalExp); }