void BtnOnClickListener(GameObject obj) { if (obj.name == PaintBtnName) { paintController.SetActive(true); } else if (obj.name == SettingBtnName) { settingController.SetActive(true); } else if (obj.name == ExitBtnName) { DialogTool.ShowTwoBtnDialog(this.transform, "提示", "确定要退出游戏吗?", DialogHitType.Exit, DialogConfirmBtnClicked, DialogCancelBtnClicked); } }
public void OnPointerClick(PointerEventData eventData) { if (eventData.clickCount == 1) { if (level > Player.Instance.maxLevel) { Toast.Show(parentTransform, "该关卡尚未开启,请先通关前面关卡"); } else { if (level == CurrentLevelMessage.Instance.levelIndex) { DialogTool.ShowTwoBtnDialog(parentTransform, "提示", "发现存档,是否从存档处继续游戏?", DialogHitType.FindArchive, DialogConfirmBtnClicked, DialogCancelBtnClicked); } else { CurrentLevelMessage.Instance.levelIndex = level; CurrentLevelMessage.Instance.Reset(); SceneManager.LoadSceneAsync("Loading"); } } } }