改动与优化
This commit is contained in:
@@ -165,7 +165,13 @@ public class UI_Idols : MonoBehaviour
|
||||
|
||||
private void HandleQuitClicked()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
UI_PanelExitUtility.PlayExitThen(gameObject, () =>
|
||||
{
|
||||
if (gameObject != null)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void BeginStartupSkillValidation()
|
||||
@@ -320,6 +326,7 @@ public class UI_Idols : MonoBehaviour
|
||||
SetObjectState(skillsObj, idolSkillsToggle != null && idolSkillsToggle.isOn);
|
||||
SetObjectState(skinsObj, idolSkinsToggle != null && idolSkinsToggle.isOn);
|
||||
SetObjectState(weaponObj, idolWeaponToggle != null && idolWeaponToggle.isOn);
|
||||
PlayActiveSectionRefresh();
|
||||
}
|
||||
|
||||
private bool AnySectionToggleOn()
|
||||
@@ -421,6 +428,7 @@ public class UI_Idols : MonoBehaviour
|
||||
|
||||
IdolLevelSnapshot snapshot = BuildLevelSnapshot(hero);
|
||||
GameObject instance = GetOrCreateCard(visibleCardCount);
|
||||
UI_OrderedEntryAnimator.PlaySingle(instance, visibleCardCount, 0.18f, 0.015f, -18f, 0.965f, true);
|
||||
visibleCardCount++;
|
||||
|
||||
idolCardPrefab card = instance.GetComponent<idolCardPrefab>();
|
||||
@@ -567,6 +575,7 @@ public class UI_Idols : MonoBehaviour
|
||||
ApplyBehaviourRadar(hero);
|
||||
|
||||
PopulateSpecialSkills(hero);
|
||||
UI_OrderedEntryAnimator.PlayRefresh(rightPanel, 0.16f, -8f, 0.99f, true);
|
||||
}
|
||||
|
||||
private void SetIdolDocumentText(string value)
|
||||
@@ -693,6 +702,7 @@ public class UI_Idols : MonoBehaviour
|
||||
}
|
||||
|
||||
GameObject instance = GetOrCreateSpecialSkillEntry(shown);
|
||||
UI_OrderedEntryAnimator.PlaySingle(instance, shown, 0.16f, 0.025f, -10f, 0.97f, true);
|
||||
|
||||
ssPrefab display = instance.GetComponent<ssPrefab>();
|
||||
if (display != null)
|
||||
@@ -839,6 +849,19 @@ public class UI_Idols : MonoBehaviour
|
||||
return entry;
|
||||
}
|
||||
|
||||
private void PlayActiveSectionRefresh()
|
||||
{
|
||||
GameObject active = null;
|
||||
if (levelsObj != null && levelsObj.activeSelf) active = levelsObj;
|
||||
else if (voicesObj != null && voicesObj.activeSelf) active = voicesObj;
|
||||
else if (detailPassageObj != null && detailPassageObj.activeSelf) active = detailPassageObj;
|
||||
else if (skillsObj != null && skillsObj.activeSelf) active = skillsObj;
|
||||
else if (skinsObj != null && skinsObj.activeSelf) active = skinsObj;
|
||||
else if (weaponObj != null && weaponObj.activeSelf) active = weaponObj;
|
||||
|
||||
UI_OrderedEntryAnimator.PlayRefresh(active, 0.16f, -8f, 0.99f, true);
|
||||
}
|
||||
|
||||
private static void SetText(Text target, string value)
|
||||
{
|
||||
if (target != null)
|
||||
@@ -939,7 +962,7 @@ public class UI_Idols : MonoBehaviour
|
||||
SetText(il.damageResistant, FormatGrowthPercent(baseLevelInfo != null ? baseLevelInfo.damageResistance : levelInfo.damageResistance, levelInfo.damageResistance));
|
||||
SetText(il.scoreEfficency, FormatGrowthPercent(baseLevelInfo != null ? baseLevelInfo.scoreEfficiency : levelInfo.scoreEfficiency, levelInfo.scoreEfficiency));
|
||||
int baseSlotAmount = baseLevelInfo != null ? baseLevelInfo.skill_slot_limited : levelInfo.skill_slot_limited;
|
||||
int effectiveSlotAmount = currentSelectedHero != null ? currentSelectedHero.GetEffectiveSkillSlotLimit() : levelInfo.skill_slot_limited;
|
||||
int effectiveSlotAmount = currentSelectedHero != null ? AllyHeroLevelRuntimeResolver.GetEffectiveSkillSlotLimit(currentSelectedHero) : levelInfo.skill_slot_limited;
|
||||
SetText(il.slotAmount, FormatGrowthInt(baseSlotAmount, effectiveSlotAmount));
|
||||
SetText(il.miss_mr, levelInfo.manaGainOnMiss.ToString());
|
||||
SetText(il.good_mr, levelInfo.manaGainGood.ToString());
|
||||
@@ -953,39 +976,12 @@ public class UI_Idols : MonoBehaviour
|
||||
|
||||
private AllyHero_SO.AllyLevelInfo GetEffectiveLevelInfoFromLedger(AllyHero_SO hero)
|
||||
{
|
||||
AllyHero_SO.AllyLevelInfo baseLevelInfo = GetBaseLevelInfoFromLedger(hero);
|
||||
return hero != null ? hero.GetEffectiveLevelInfoWithEquipment(baseLevelInfo) : null;
|
||||
return AllyHeroLevelRuntimeResolver.GetEffectiveLevelInfo(hero);
|
||||
}
|
||||
|
||||
private AllyHero_SO.AllyLevelInfo GetBaseLevelInfoFromLedger(AllyHero_SO hero)
|
||||
{
|
||||
if (hero == null || hero.levelStats == null || hero.levelStats.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AllyHero_SO.AllyLevelInfo> levels = new List<AllyHero_SO.AllyLevelInfo>();
|
||||
for (int i = 0; i < hero.levelStats.Count; i++)
|
||||
{
|
||||
if (hero.levelStats[i] != null)
|
||||
{
|
||||
levels.Add(hero.levelStats[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (levels.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
levels.Sort((left, right) => left.requiredEXP.CompareTo(right.requiredEXP));
|
||||
int index = ResolveUnlockedLevelIndexFromLedger(hero, levels, AllyHeroDeployLedger.EnsureInstance());
|
||||
if (index < 0 || index >= levels.Count)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return levels[index];
|
||||
return AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(hero);
|
||||
}
|
||||
|
||||
private int ResolveUnlockedLevelIndexFromLedger(AllyHero_SO hero, List<AllyHero_SO.AllyLevelInfo> levels, AllyHeroDeployLedger ledger)
|
||||
|
||||
@@ -440,6 +440,7 @@ public class idolEquipments : MonoBehaviour
|
||||
{
|
||||
equippedItemInstance = Instantiate(eqpmtItemPrefab, eqpmtToPut);
|
||||
equippedItemInstance.name = string.IsNullOrWhiteSpace(equippedEquipment.GetDisplayTierName()) ? equippedEquipment.name : equippedEquipment.GetDisplayTierName();
|
||||
UI_OrderedEntryAnimator.PlayFadeOnly(equippedItemInstance, 0, 0.14f, 0f, true);
|
||||
|
||||
equipItemPrefab item = equippedItemInstance.GetComponent<equipItemPrefab>();
|
||||
if (item != null)
|
||||
@@ -937,6 +938,7 @@ public class idolEquipments : MonoBehaviour
|
||||
{
|
||||
item.SetActive(true);
|
||||
}
|
||||
UI_OrderedEntryAnimator.PlaySingle(item, index, 0.16f, 0.012f, -10f, 0.97f, true);
|
||||
}
|
||||
|
||||
return item;
|
||||
|
||||
@@ -61,7 +61,7 @@ public class idolSkillsHub : MonoBehaviour
|
||||
currentHero.LoadEquippedSkillsFromLocal();
|
||||
|
||||
int currentTierNumber = GetCurrentTierNumber(currentHero);
|
||||
int maxSkillSlots = currentHero.GetEffectiveSkillSlotLimit();
|
||||
int maxSkillSlots = AllyHeroLevelRuntimeResolver.GetEffectiveSkillSlotLimit(currentHero);
|
||||
int equippedCount = GetEquippedCount();
|
||||
int visibleIndex = 0;
|
||||
|
||||
@@ -172,7 +172,7 @@ public class idolSkillsHub : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
int maxSkillSlots = currentHero.GetEffectiveSkillSlotLimit();
|
||||
int maxSkillSlots = AllyHeroLevelRuntimeResolver.GetEffectiveSkillSlotLimit(currentHero);
|
||||
if (equipped.Count >= maxSkillSlots)
|
||||
{
|
||||
Rebuild();
|
||||
@@ -273,7 +273,7 @@ public class idolSkillsHub : MonoBehaviour
|
||||
return 1;
|
||||
}
|
||||
|
||||
return Mathf.Clamp(hero.ally_growthUnlockedTierIndex + 1, 1, 4);
|
||||
return AllyHeroLevelRuntimeResolver.GetCurrentTierNumber(hero);
|
||||
}
|
||||
|
||||
private static string GetTierName(int tierNumber)
|
||||
@@ -322,6 +322,7 @@ public class idolSkillsHub : MonoBehaviour
|
||||
{
|
||||
item.SetActive(true);
|
||||
}
|
||||
UI_OrderedEntryAnimator.PlaySingle(item, index, 0.16f, 0.018f, -10f, 0.97f, true);
|
||||
}
|
||||
|
||||
return item;
|
||||
|
||||
@@ -1285,6 +1285,7 @@ public class idolUpgrade : MonoBehaviour
|
||||
}
|
||||
|
||||
GameObject instance = Instantiate(materialPrefab, materialContainer);
|
||||
UI_OrderedEntryAnimator.PlaySingle(instance, materialContainer.childCount - 1, 0.16f, 0.016f, -10f, 0.97f, true);
|
||||
materialPrefab item = instance.GetComponent<materialPrefab>();
|
||||
if (item != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user