修了不少东西

This commit is contained in:
FloatGaming
2026-07-16 23:04:59 +08:00
parent 29972d0705
commit 73fe474cc6
134 changed files with 7673 additions and 741 deletions
+6 -5
View File
@@ -289,12 +289,13 @@ public class newTeamSelector : MonoBehaviour
private int[] ReadSelectedHeroIdsFromPlayerPrefs()
{
TeamSelectionDefaults.EnsureDefaultTeamIfMissing();
int[] ids = new int[Mathf.Max(5, slotCount)];
if (ids.Length > 0) ids[0] = Mathf.Max(0, PlayerPrefs.GetInt("selected_heroSlot01_heroID", 0));
if (ids.Length > 1) ids[1] = Mathf.Max(0, PlayerPrefs.GetInt("selected_heroSlot02_heroID", 0));
if (ids.Length > 2) ids[2] = Mathf.Max(0, PlayerPrefs.GetInt("selected_heroSlot03_heroID", 0));
if (ids.Length > 3) ids[3] = Mathf.Max(0, PlayerPrefs.GetInt("selected_heroSlot04_heroID", 0));
if (ids.Length > 4) ids[4] = Mathf.Max(0, PlayerPrefs.GetInt("selected_heroSlot05_heroID", 0));
if (ids.Length > 0) ids[0] = TeamSelectionDefaults.ReadHeroId(1);
if (ids.Length > 1) ids[1] = TeamSelectionDefaults.ReadHeroId(2);
if (ids.Length > 2) ids[2] = TeamSelectionDefaults.ReadHeroId(3);
if (ids.Length > 3) ids[3] = TeamSelectionDefaults.ReadHeroId(4);
if (ids.Length > 4) ids[4] = TeamSelectionDefaults.ReadHeroId(5);
return ids;
}