成就系统 巨大修改 新的ui 黑白效果 等一堆
This commit is contained in:
@@ -188,8 +188,10 @@ public class TeamManager : MonoBehaviour
|
||||
//如果在队伍中已有角色的情况下再次触发此方法,首先要去掉旧信息,再放新信息
|
||||
CharacterView newCharacter = currentSelectedCharacterCard;
|
||||
List<CharacterView> newCurrentTeam = getCurrentSelectedTeam().teamIdList;
|
||||
|
||||
if (aimListIndex > 0 || aimListIndex < newCurrentTeam.Count)
|
||||
|
||||
// 修复:原代码使用 (aimListIndex > 0 || aimListIndex < Count) 永远几乎为真,
|
||||
// 会导致当 aimListIndex = 0 或越界时也进入逻辑,造成数据错乱。
|
||||
if (aimListIndex >= 0 && aimListIndex < newCurrentTeam.Count)
|
||||
{
|
||||
for(int i=0;i<newCurrentTeam.Count;i++)
|
||||
{
|
||||
@@ -209,10 +211,14 @@ public class TeamManager : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
newCurrentTeam[aimListIndex] = newCharacter;
|
||||
currentTeamSettings[currentSelectedTeam].teamIdList = newCurrentTeam;
|
||||
teamSettingPanelInstance.updateTeamSettingElements();
|
||||
return;
|
||||
}
|
||||
newCurrentTeam[aimListIndex] = newCharacter;
|
||||
currentTeamSettings[currentSelectedTeam].teamIdList = newCurrentTeam;
|
||||
teamSettingPanelInstance.updateTeamSettingElements();
|
||||
|
||||
Debug.LogWarning($"TeamManager.ResetTeamCharacter: aimListIndex out of range: {aimListIndex} (Count={newCurrentTeam.Count})");
|
||||
}
|
||||
/// <summary>
|
||||
/// 移除队伍中的指定角色
|
||||
|
||||
Reference in New Issue
Block a user