| | |
| | | /// </summary> |
| | | public void ReturnToMainMenu() |
| | | { |
| | | if (GameConfig.IsNewbieGuideCompleted) |
| | | GameConfig.IsNewbie = false; |
| | | |
| | | // 清空所有Tween数据: |
| | | DOTween.Clear(); |
| | | EndlessUIStart.bFirstLoaded = false; |
| | |
| | | /// </summary> |
| | | protected void Victory() |
| | | { |
| | | EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessLevelCompleted); |
| | | EndlessUIStart.instance.Pause(); |
| | | |
| | | int showFavorite = PlayerPrefs.GetInt("GemBattleFavorite"); |
| | | |
| | | if (showFavorite == 0) |
| | | { |
| | | GameObject go = Instantiate(Resources.Load<GameObject>("UI/Favorite/FavoritePanel"), this.transform.root); |
| | | FavoritePanelUI panelUI = go.GetComponent<FavoritePanelUI>(); |
| | | panelUI.SetAC(ShowPanel); |
| | | |
| | | } |
| | | else |
| | | { |
| | | ShowPanel(); |
| | | } |
| | | } |
| | | |
| | | private void ShowPanel() |
| | | { |
| | | OpenEndGameScreen(true); |
| | | if (VictoryAudio != null && AudioSource != null) |
| | | AudioSource.PlayOneShot(VictoryAudio); |