//Displaying the World Map public void DisplayWorldMap(int slot) { displayedWorld = slot; for (int i = 0; i < levels.Length; i++) { // levels[i].name = worlds[slot].levels[i].name; UI_Level ui = levels[i].GetComponent <UI_Level>(); ui._name.text = worlds[slot].levels[i].name; ui.description.text = worlds[slot].levels[i].description; ui.icon.sprite = worlds[slot].levels[i].icon; ui.backing.color = worlds[slot].levels[i].backing_color; } map.SetActive(true); }
//Get a level's icon public void GetLevelIcon(UI_Level level, int world, int levelIndex) { level.icon.sprite = worlds[world].levels[levelIndex].icon; level.backing.sprite = worlds[world].levels[levelIndex].backing; }