private void TogglePreviewBtns(WorldSelectionMenuState state) { if (state == WorldSelectionMenuState.MyWorld) { foreach (GameObject obj in myWorldGroup) { obj.SetActive(true); } foreach (GameObject obj in otherWorldGroup) { obj.SetActive(false); } } else if (state == WorldSelectionMenuState.WorldCenter) { foreach (GameObject obj in myWorldGroup) { obj.SetActive(false); } foreach (GameObject obj in otherWorldGroup) { obj.SetActive(true); } } }
public void SwapMenuState(WorldSelectionMenuState swapTo) { currentState = swapTo; if (currentState == WorldSelectionMenuState.MyWorld) { myWorldBtn.interactable = false; worldCenterBtn.interactable = true; ClearAllItems(); StartCoroutine(LoadWorldListRutine(myWorlds, myWorldListUrl)); } else if (currentState == WorldSelectionMenuState.WorldCenter) { myWorldBtn.interactable = true; worldCenterBtn.interactable = false; ClearAllItems(); StartCoroutine(LoadWorldListRutine(otherWorlds, otherWorldListUrl)); } }