修了不少东西
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user