改动与优化
This commit is contained in:
@@ -204,6 +204,7 @@ public class notebookController : MonoBehaviour
|
||||
comp.SetFatherImage(so.class_image);
|
||||
if (comp.father_description != null) comp.father_description.text = so.class_description;
|
||||
SetupFatherItem(comp, so, fatherGroup);
|
||||
UI_OrderedEntryAnimator.PlaySingle(obj, i, 0.18f, 0.012f, -14f, 0.97f, true);
|
||||
if (firstFatherToggle == null)
|
||||
{
|
||||
firstFatherToggle = ResolveFatherToggle(comp);
|
||||
@@ -302,6 +303,7 @@ public class notebookController : MonoBehaviour
|
||||
if (son == null) continue;
|
||||
if (!son.son_isUnlocked) continue;
|
||||
var obj = Instantiate(prefab, parent);
|
||||
UI_OrderedEntryAnimator.PlaySingle(obj, i, 0.16f, 0.018f, -10f, 0.97f, true);
|
||||
var sonComp = obj.GetComponent<sonItemPrefab>();
|
||||
Toggle sonToggle = null;
|
||||
if (sonComp != null && sonComp.sonToggle != null) sonToggle = sonComp.sonToggle;
|
||||
@@ -396,6 +398,7 @@ public class notebookController : MonoBehaviour
|
||||
}
|
||||
if (passage_title != null) passage_title.text = son.son_title;
|
||||
if (passage_text != null) passage_text.text = son.son_passage;
|
||||
PlayDetailsRefresh();
|
||||
}
|
||||
|
||||
private void InvokeToggleAction(Toggle toggle, System.Action onSelected)
|
||||
@@ -823,4 +826,13 @@ public class notebookController : MonoBehaviour
|
||||
|
||||
ApplySonDetails(father, son);
|
||||
}
|
||||
|
||||
private void PlayDetailsRefresh()
|
||||
{
|
||||
GameObject target = null;
|
||||
if (detailsImage != null) target = detailsImage.gameObject;
|
||||
if (target == null && passage_title != null) target = passage_title.gameObject;
|
||||
if (target == null && passage_text != null) target = passage_text.gameObject;
|
||||
UI_OrderedEntryAnimator.PlayRefresh(target, 0.16f, -8f, 0.99f, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public class RatioBar : MonoBehaviour
|
||||
{
|
||||
if (heroSO == null) return;
|
||||
|
||||
var levelInfo = heroSO.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(heroSO);
|
||||
if (levelInfo == null) return;
|
||||
|
||||
// Documentation text normalized.
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class character_detailInformation : MonoBehaviour
|
||||
designation_name_combination.text = $"{heroSO.ally_heroDesignation} {heroSO.ally_heroName}";
|
||||
}
|
||||
|
||||
var levelInfo = heroSO.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(heroSO);
|
||||
if (levelInfo != null)
|
||||
{
|
||||
int attack = levelInfo.attack;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class levelBar_controller : MonoBehaviour
|
||||
{
|
||||
if (heroSO == null || heroSO.levelStats == null || heroSO.levelStats.Count == 0) return;
|
||||
|
||||
var levelInfo = heroSO.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(heroSO);
|
||||
if (levelInfo == null) return;
|
||||
|
||||
string currentLevel = GetRatingFromSO(heroSO);
|
||||
@@ -71,7 +71,7 @@ public class levelBar_controller : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
int currentEXP = heroSO.ally_currentEXP;
|
||||
int currentEXP = AllyHeroLevelRuntimeResolver.GetCurrentExp(heroSO);
|
||||
|
||||
// Documentation text normalized.
|
||||
for (int i = 0; i < 4; i++)
|
||||
@@ -198,15 +198,6 @@ public class levelBar_controller : MonoBehaviour
|
||||
return "C";
|
||||
}
|
||||
|
||||
if (so.ally_heroID <= 0)
|
||||
{
|
||||
return so.GetDisplayLevelRatingKey();
|
||||
}
|
||||
|
||||
AllyHeroDeployLedger ledger = AllyHeroDeployLedger.EnsureInstance();
|
||||
int currentExp = ledger.GetCurrentExp(so.ally_heroID);
|
||||
int unlockedTier = ledger.GetUnlockedTierIndex(so.ally_heroID);
|
||||
bool levelLocked = ledger.IsLevelLockEnabled(so.ally_heroID);
|
||||
return so.GetDisplayLevelRatingKeyFromGrowth(currentExp, unlockedTier, levelLocked);
|
||||
return AllyHeroLevelRuntimeResolver.GetDisplayRatingKey(so);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,10 +149,13 @@ public class loadSkillsSelect : MonoBehaviour
|
||||
: $"Column {columnId}";
|
||||
|
||||
Transform skillsContainer = BuildColumnContainer(columnId, columnName);
|
||||
int cardAnimIndex = 0;
|
||||
|
||||
foreach (SkillGroup group in columnGroups)
|
||||
{
|
||||
GameObject card = Instantiate(skillCardPrefab, skillsContainer);
|
||||
UI_OrderedEntryAnimator.PlayFadeOnly(card, cardAnimIndex, 0.16f, 0.012f, true);
|
||||
cardAnimIndex++;
|
||||
|
||||
slots_skillSlots slot = card.GetComponent<slots_skillSlots>();
|
||||
if (slot == null)
|
||||
@@ -292,6 +295,7 @@ public class loadSkillsSelect : MonoBehaviour
|
||||
if (columnHeaderPrefab != null)
|
||||
{
|
||||
GameObject header = Instantiate(columnHeaderPrefab, columnContainer.transform);
|
||||
UI_OrderedEntryAnimator.PlayFadeOnly(header, 0, 0.14f, 0f, true);
|
||||
ApplyColumnHeaderText(header, columnName);
|
||||
}
|
||||
|
||||
@@ -457,7 +461,7 @@ public class loadSkillsSelect : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
int currentLevelId = hero.GetEffectiveLevelForCurrentEXP()?.levelID ?? 0;
|
||||
int currentLevelId = AllyHeroLevelRuntimeResolver.GetCurrentLevelId(hero);
|
||||
int requiredLevelId = Mathf.Clamp(group.thisSkill_levelLimit, 1, 4);
|
||||
return currentLevelId >= requiredLevelId;
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ public class loadTeam_select : MonoBehaviour
|
||||
if (!so.isUnlocked) continue;
|
||||
var go = Instantiate(roleCardPrefab, contentParent);
|
||||
go.transform.SetParent(contentParent, false);
|
||||
UI_OrderedEntryAnimator.PlayFadeOnly(go, i, 0.16f, 0.012f, true);
|
||||
var ctrl = go.GetComponent<roleCard_prefabController>();
|
||||
if (ctrl == null)
|
||||
{
|
||||
|
||||
+3
-1
@@ -106,7 +106,7 @@ public class load_skill_detail_prefab_inHeroDetailPrefab : MonoBehaviour
|
||||
}
|
||||
|
||||
var equippedIds = (found.equippedSkillGroupIDs ?? new int[0]).Where(id => id != 0).ToList();
|
||||
var levelInfo = found.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(found);
|
||||
int currentMaxSlots = levelInfo?.skill_slot_limited ?? 0;
|
||||
|
||||
int maxSlotsOverall = 0;
|
||||
@@ -129,6 +129,7 @@ public class load_skill_detail_prefab_inHeroDetailPrefab : MonoBehaviour
|
||||
}
|
||||
|
||||
var go = Instantiate(skillDetailPrefab, contentParent);
|
||||
UI_OrderedEntryAnimator.PlayFadeOnly(go, created, 0.16f, 0.012f, true);
|
||||
var detail = go.GetComponent<skill_detail_prefab_inHeroDetail>();
|
||||
if (detail == null)
|
||||
{
|
||||
@@ -157,6 +158,7 @@ public class load_skill_detail_prefab_inHeroDetailPrefab : MonoBehaviour
|
||||
}
|
||||
|
||||
var emptyGo = Instantiate(skillDetailPrefab, contentParent);
|
||||
UI_OrderedEntryAnimator.PlayFadeOnly(emptyGo, created, 0.16f, 0.012f, true);
|
||||
var detailEmpty = emptyGo.GetComponent<skill_detail_prefab_inHeroDetail>();
|
||||
if (detailEmpty == null)
|
||||
{
|
||||
|
||||
@@ -465,7 +465,7 @@ public class slots_heroSlots : MonoBehaviour, IDropHandler, IBeginDragHandler, I
|
||||
}
|
||||
|
||||
// Documentation text normalized.
|
||||
var levelInfo = found.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(found);
|
||||
if (levelInfo != null && heroLevelImage != null)
|
||||
{
|
||||
string level = GetRatingFromSO(found);
|
||||
@@ -677,7 +677,7 @@ public class slots_heroSlots : MonoBehaviour, IDropHandler, IBeginDragHandler, I
|
||||
var hero = FindHeroById(id);
|
||||
if (hero != null)
|
||||
{
|
||||
var levelInfo = hero.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(hero);
|
||||
if (levelInfo != null && heroLevelImage != null)
|
||||
{
|
||||
string level = GetRatingFromSO(hero);
|
||||
@@ -731,6 +731,7 @@ public class slots_heroSlots : MonoBehaviour, IDropHandler, IBeginDragHandler, I
|
||||
}
|
||||
|
||||
// Instantiate skill cards for equipped groups
|
||||
int skillAnimIndex = 0;
|
||||
foreach (int groupId in hero.equippedSkillGroupIDs)
|
||||
{
|
||||
if (groupId == 0) continue; // Skip empty
|
||||
@@ -739,6 +740,8 @@ public class slots_heroSlots : MonoBehaviour, IDropHandler, IBeginDragHandler, I
|
||||
if (group == null) continue;
|
||||
|
||||
GameObject skillGo = Instantiate(skillCardPrefab, skillContainer.transform);
|
||||
UI_OrderedEntryAnimator.PlayFadeOnly(skillGo, skillAnimIndex, 0.14f, 0.01f, true);
|
||||
skillAnimIndex++;
|
||||
slots_skillSlots skillSlot = skillGo.GetComponent<slots_skillSlots>();
|
||||
if (skillSlot != null)
|
||||
{
|
||||
@@ -874,10 +877,17 @@ public class slots_heroSlots : MonoBehaviour, IDropHandler, IBeginDragHandler, I
|
||||
rt.DOKill();
|
||||
cg.DOKill();
|
||||
Vector2 basePos = rt.anchoredPosition;
|
||||
rt.anchoredPosition = basePos + new Vector2(0f, -changeMoveOffset);
|
||||
bool canMove = !UI_OrderedEntryAnimator.IsLayoutSensitive(rt);
|
||||
if (canMove)
|
||||
{
|
||||
rt.anchoredPosition = basePos + new Vector2(0f, -changeMoveOffset);
|
||||
}
|
||||
cg.alpha = 0f;
|
||||
Sequence seq = DOTween.Sequence();
|
||||
seq.Join(rt.DOAnchorPos(basePos, changeMoveTime).SetEase(Ease.OutCubic));
|
||||
if (canMove)
|
||||
{
|
||||
seq.Join(rt.DOAnchorPos(basePos, changeMoveTime).SetEase(Ease.OutCubic));
|
||||
}
|
||||
seq.Join(cg.DOFade(1f, changeMoveTime));
|
||||
seq.Append(cg.DOFade(0f, changeBlinkTime));
|
||||
seq.Append(cg.DOFade(1f, changeBlinkTime));
|
||||
|
||||
@@ -155,7 +155,7 @@ public class slots_skillSlots : MonoBehaviour, IPointerClickHandler, IPointerEnt
|
||||
}
|
||||
|
||||
SkillGroup skillGroup = so.GetSkillGroupByID(skillCard_skillID);
|
||||
var levelInfo = so.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(so);
|
||||
int currentLevel = levelInfo?.levelID ?? 0;
|
||||
int requiredLevel = skillGroup?.thisSkill_levelLimit ?? 1;
|
||||
if (currentLevel < requiredLevel)
|
||||
@@ -191,7 +191,7 @@ public class slots_skillSlots : MonoBehaviour, IPointerClickHandler, IPointerEnt
|
||||
if (!isSelected)
|
||||
{
|
||||
// Documentation text normalized.
|
||||
var levelInfo = so?.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(so);
|
||||
int maxSlots = levelInfo?.skill_slot_limited ?? int.MaxValue; // Documentation text normalized.
|
||||
int currentEquipped = so?.equippedSkillGroupIDs.Where(id => id != 0).Count() ?? 0;
|
||||
|
||||
@@ -307,7 +307,7 @@ public class slots_skillSlots : MonoBehaviour, IPointerClickHandler, IPointerEnt
|
||||
|
||||
// Documentation text normalized.
|
||||
string status;
|
||||
var levelInfo = hero.GetEffectiveLevelForCurrentEXP();
|
||||
var levelInfo = AllyHeroLevelRuntimeResolver.GetBaseLevelInfo(hero);
|
||||
int maxSlots = levelInfo?.skill_slot_limited ?? int.MaxValue;
|
||||
int currentEquipped = hero.equippedSkillGroupIDs.Where(id => id != 0).Count();
|
||||
int requiredLevel = group.thisSkill_levelLimit;
|
||||
|
||||
Reference in New Issue
Block a user