void ShowPopUpModeClassis(int time, List <int> topscore) { Level.SetActive(false); Retry.gameObject.SetActive(false); Arcade.SetActive(false); TopScore.SetActive(true); int count = topscore.Count; for (int i = 0; i < count; i++) { if (topscore[i] != 10000) { var best = topscore[i]; var min2 = best / 60; var sec2 = best % 60; if (i == 0) { BestScore1[0].sprite = min2 < 10 ? Number1[0] : Number1[min2 / 10]; BestScore1[1].sprite = Number1[min2 % 10]; BestScore1[2].sprite = sec2 < 10 ? Number1[0] : Number1[sec2 / 10]; BestScore1[3].sprite = Number1[sec2 % 10]; BestScore1[4].color = new Color(1, 1, 1, 1); } else if (i == 1) { BestScore2[0].sprite = min2 < 10 ? Number1[0] : Number1[min2 / 10]; BestScore2[1].sprite = Number1[min2 % 10]; BestScore2[2].sprite = sec2 < 10 ? Number1[0] : Number1[sec2 / 10]; BestScore2[3].sprite = Number1[sec2 % 10]; BestScore2[4].color = new Color(1, 1, 1, 1); } else { BestScore3[0].sprite = min2 < 10 ? Number1[0] : Number1[min2 / 10]; BestScore3[1].sprite = Number1[min2 % 10]; BestScore3[2].sprite = sec2 < 10 ? Number1[0] : Number1[sec2 / 10]; BestScore3[3].sprite = Number1[sec2 % 10]; BestScore3[4].color = new Color(1, 1, 1, 1); } } } var min = time / 60; var sec = time % 60; TimeScore2[0].sprite = min < 10 ? Number2[0] : Number2[min / 10]; TimeScore2[1].sprite = Number2[min % 10]; TimeScore2[2].sprite = sec < 10 ? Number2[0] : Number2[sec / 10]; TimeScore2[3].sprite = Number2[sec % 10]; // SceneManager.instance.PlayGameController.SaveGame(); }
void ShowPopUpModeArcade(int time, bool isNormal) { Arcade.SetActive(true); TopScore.SetActive(false); Level.SetActive(true); foreach (var item in LevelText) { item.sprite = null; } Stars.SetActive(true); LeanTween.rotateX(Stars, 1f, 0.15f); Retry.gameObject.SetActive(true); if (time < 2 * GameData.TIMERATE) { Star[0].gameObject.SetActive(true); Star[1].gameObject.SetActive(true); Star[2].gameObject.SetActive(true); } else if (time < 3 * GameData.TIMERATE) { Star[0].gameObject.SetActive(true); Star[1].gameObject.SetActive(true); } else { Star[0].gameObject.SetActive(true); } int currentLevel = SceneManager.instance.CurrentLevel + 1; if (!isNormal) { currentLevel -= 1; } var temp = currentLevel.ToString(); for (int i = 0; i < temp.Length; i++) { var ind = int.Parse(temp[i].ToString()); LevelText[i].sprite = Number[ind]; LevelText[i].SetNativeSize(); } if (currentLevel >= SceneManager.instance.MapNumber * SceneManager.instance.LevelPerMap) { currentLevel = SceneManager.instance.MapNumber * SceneManager.instance.LevelPerMap; } if (currentLevel % SceneManager.instance.NumberLevelShowPopUp == 0 && currentLevel > 0) { SceneManager.instance.PopUpRateController.ShowPopUpRate(); } var best = time; //var data = SceneManager.instance.GetMapData(SceneManager.instance.CurrentLevel); var data = MaxScore; if (time < data || data == 0) { Record.color = new Color(1, 1, 1, 1); PlayerPrefs.SetInt("BEST_SCORE", best); MaxScore = best; } else { Record.color = new Color(1, 1, 1, 0); best = data; } var min = time / 60; var sec = time % 60; TimeScore[0].sprite = min < 10 ? Number[0] : Number[min / 10]; TimeScore[1].sprite = Number[min % 10]; TimeScore[2].sprite = sec < 10 ? Number[0] : Number[sec / 10]; TimeScore[3].sprite = Number[sec % 10]; var min2 = data / 60; var sec2 = data % 60; BestScore[0].sprite = min2 < 10 ? Number[0] : Number[min2 / 10]; BestScore[1].sprite = Number[min2 % 10]; BestScore[2].sprite = sec2 < 10 ? Number[0] : Number[sec2 / 10]; BestScore[3].sprite = Number[sec2 % 10]; }