static public void SetLevelPanel(int panelIndex, int levelIndex) { LevelPanel selectedPanel = Instance.encodeSeedCanvas.GetComponentsInChildren <LevelPanel>()[panelIndex]; selectedPanel.GetComponentsInChildren <Image>(true)[2].gameObject.SetActive(true); selectedPanel.GetComponentsInChildren <TextMeshProUGUI>(true)[0].gameObject.SetActive(true); selectedPanel.GetComponentsInChildren <TextMeshProUGUI>(true)[1].gameObject.SetActive(true); selectedPanel.GetComponentsInChildren <TextMeshProUGUI>()[1].text = LevelSetManager.AllLevels[levelIndex].name; selectedPanel.GetComponentsInChildren <Image>()[2].sprite = LevelSetManager.AllLevels[levelIndex].preview; }
static public void HideLevelPanel(int panelIndex) { if (panelIndex >= 6) { return; } LevelPanel selectedPanel = Instance.encodeSeedCanvas.GetComponentsInChildren <LevelPanel>()[panelIndex]; selectedPanel.GetComponentsInChildren <Image>(true)[2].gameObject.SetActive(false); selectedPanel.GetComponentsInChildren <TextMeshProUGUI>(true)[0].gameObject.SetActive(false); selectedPanel.GetComponentsInChildren <TextMeshProUGUI>(true)[1].gameObject.SetActive(false); }