public void updateJobSlots() { int index = 0; foreach (Transform child in JobSystemPanel.transform) { JobSlotController instance = child.GetComponent <JobSlotController>(); if (index < availableJobs.Count) { instance.job = availableJobs[index]; } else { instance.job = null; } instance.UpdateInfo(); index++; } }
public void updateJobSlots() { int index = 0; foreach (Transform child in JobSystemPanel.transform) { JobSlotController instance = child.GetComponent <JobSlotController>(); if (index < PlayerManager.instance.playerJobList.Count) { instance.job = PlayerManager.instance.playerJobList[index]; } else { instance.job = null; } instance.UpdateInfo(); index++; } }