public void Play() { PlayerDataUtils.loadData(); LevelUtils.currentLevel = LevelUtils.GetLevel(PlayerDataUtils.playerData.currentLevelIndex); SceneManager.LoadScene("Play"); Done_GameController.instance.Start(); }
void OnNextButtonClick() { PlayerDataUtils.playerData.currentLevelIndex = PlayerDataUtils.playerData.currentLevelIndex + 1; LevelUtils.currentLevel = LevelUtils.GetLevel(PlayerDataUtils.playerData.currentLevelIndex); PlayerDataUtils.saveData(); SceneManager.LoadScene("Play"); gameObject.SetActive(false); }
void OnButtonInfoClick() { infoPanel.SetActive(true); GameObject goParent = EventSystem.current.currentSelectedGameObject.transform.parent.gameObject; int levelNumber = Int32.Parse(goParent.GetComponentInChildren<Text>().text); Debug.Log(levelNumber); currentViewInfoLevel= LevelUtils.GetLevel(levelNumber); infoPanel.GetComponent<DialogManager>().ShowData(); }
void OnButtonClick() { int levelNumber = Int32.Parse(EventSystem.current.currentSelectedGameObject.GetComponentInChildren<Text>().text); LevelUtils.currentLevel = LevelUtils.GetLevel(levelNumber); PlayerDataUtils.playerData.currentLevelIndex = levelNumber; PlayerDataUtils.saveData(); SceneManager.LoadScene("Play"); }
void OnRedoButtonClick() { LevelUtils.currentLevel = LevelUtils.GetLevel(PlayerDataUtils.playerData.currentLevelIndex); gameObject.SetActive(false); SceneManager.LoadScene("Play"); }