改动与优化

This commit is contained in:
FloatGaming
2026-07-20 22:19:25 +08:00
parent 0a0872c4f4
commit b5d1cdcbc5
83 changed files with 2475 additions and 276 deletions
+28 -3
View File
@@ -196,7 +196,9 @@ public class teamSettingPanel : MonoBehaviour
if (tcdi != null)
{
if (t.charcterImg != null) { t.charcterImg.sprite = tcdi.CharacterTeamSprite; t.charcterImg.color=new Color(t.charcterImg.color.r,t.charcterImg.color.g,t.charcterImg.color.b,1f); }
if (t.levelIcon != null) { t.levelIcon.sprite = getLevelSprite(currentTeam[i].currentBoundaryLevel); t.levelIcon.color=new Color(t.levelIcon.color.r,t.levelIcon.color.g,t.levelIcon.color.b,1f); }
string boundaryLevel = ResolveBoundaryLevel(t.characterID, currentTeam[i].currentBoundaryLevel);
currentTeam[i].currentBoundaryLevel = boundaryLevel;
if (t.levelIcon != null) { t.levelIcon.sprite = getLevelSprite(boundaryLevel); t.levelIcon.color=new Color(t.levelIcon.color.r,t.levelIcon.color.g,t.levelIcon.color.b,1f); }
if (t.skillName != null) t.skillName.text = tcdi.CharacterSkillName ?? string.Empty;
}
else
@@ -230,6 +232,7 @@ public class teamSettingPanel : MonoBehaviour
teamManager.currentSelectedCharacterCard = null;
List<CharacterView> currentTeam = teamManager.getCurrentSelectedTeam().teamIdList;
List<CharacterView> selectAbleCharacters = teamManager.SelectableCharacterList;
int visibleIndex = 0;
foreach (CharacterView c in selectAbleCharacters) //id and level
{
if (!IsCharacterUnlocked(c != null ? c.characterId : 0))
@@ -238,14 +241,16 @@ public class teamSettingPanel : MonoBehaviour
}
GameObject characterObj = Instantiate(teamCharacterPrefab, teamCharacterViewContent.transform);
UI_OrderedEntryAnimator.PlayFadeOnly(characterObj, visibleIndex, 0.16f, 0.012f, true);
visibleIndex++;
CharacterCardView ccv = characterObj.GetComponent<CharacterCardView>();
TeamCharacterDataInfo tcdi = getCharacterViewInfo(c.characterId);
if (ccv != null&& tcdi!=null)
{
ccv.characterID = tcdi.CharacterID;
ccv.currentBoundaryLevel= c.currentBoundaryLevel;
ccv.currentBoundaryLevel= ResolveBoundaryLevel(c.characterId, c.currentBoundaryLevel);
ccv.characterImage.sprite =tcdi.CharacterCardSprite;
ccv.levelIcon.sprite = getLevelSprite(c.currentBoundaryLevel);
ccv.levelIcon.sprite = getLevelSprite(ccv.currentBoundaryLevel);
ccv.occupationIcon.sprite = tcdi.CharacterRoleSprite;
}
@@ -277,6 +282,26 @@ public class teamSettingPanel : MonoBehaviour
return false;
}
private string ResolveBoundaryLevel(int characterID, string fallbackLevel)
{
if (characterID <= 0)
{
return fallbackLevel;
}
AllyHero_SO[] heroes = RuntimeResourcesCache.LoadAllAllyHeroes();
for (int i = 0; i < heroes.Length; i++)
{
AllyHero_SO hero = heroes[i];
if (hero != null && hero.ally_heroID == characterID)
{
return AllyHeroLevelRuntimeResolver.GetDisplayRatingKey(hero);
}
}
return fallbackLevel;
}
private bool checkExistenceStatus(List<CharacterView> currentTeam,int characterID)
{
foreach (CharacterView c in currentTeam)