// Use this for initialization void Start() { data = DataSender.ReturnGameResult(); autoplay = DataSender.ReturnAutoPlay(); j = data.GetAllNoteDecision(); allNote = data.GetNoteCount(); sc = data.GetMaxScore(); pc = data.GetMaxPercent(); song.text = DataSender.ReturnSongName(); miss.text = j[0].ToString(); bad.text = j[1].ToString(); nice.text = j[2].ToString(); great.text = j[3].ToString(); perf.text = (j[4] + j[5]).ToString(); all.text = allNote.ToString(); totcom.text = data.GetMaxCombo().ToString(); if (j[5] > 0) { tpst.gameObject.SetActive(true); tpst.text = j[5].ToString(); } totsco.text = sc.ToString(); perc.text = pc.ToString("N2") + "%"; if (data.GetMaxCombo() >= allNote) { isFC = true; if ((j[4] + j[5]) >= allNote) { isAP = true; if ((j[4] + j[5]).Equals(j[5])) { isRT = true; } } } if (!autoplay && allNote >= 500 && isFC && Social.localUser.authenticated) { #if UNITY_ANDROID PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_sweety_fruition, 100.0f, null); PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_marginal_utility, 1, null); PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_voracity, 1, null); #elif UNITY_IOS Achievementer.ReportProgress("sweetyfruit"); Achievementer.ReportProgress("marginalutility", 5.0f); Achievementer.ReportProgress("voracity", 2.0f); #endif } if (!autoplay && allNote >= 500 && isAP && Social.localUser.authenticated) { #if UNITY_ANDROID PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_perfect_itself, 100.0f, null); PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_admirable, 1, null); #elif UNITY_IOS Achievementer.ReportProgress("perfectitself"); Achievementer.ReportProgress("admirable", 5.0f); #endif } if (!autoplay && allNote >= 500 && isRT && Social.localUser.authenticated) { #if UNITY_ANDROID PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_you_are_really_a_monster, 100.0f, null); #elif UNITY_IOS Achievementer.ReportProgress("youaremonster"); #endif } if (!autoplay && allNote >= 300 && (j[0] + j[1] + j[2]).Equals(1) && Social.localUser.authenticated) { #if UNITY_ANDROID PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_its_ok_dont_be_depressed, 100.0f, null); #elif UNITY_IOS Achievementer.ReportProgress("itsok"); #endif if (j[2].Equals(1)) { #if UNITY_ANDROID PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_discovering_science, 1, null); PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_science_theory, 1, null); PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_should_earn_a_nobel_prize, 1, null); #elif UNITY_IOS Achievementer.ReportProgress("science", 34.0f); Achievementer.ReportProgress("theory", 10.0f); Achievementer.ReportProgress("nobelprize", 4.0f); #endif } } string tsl, tff, tsa; // tsl만 쓰임 bool tap, trw, tmi; DataSender.ResultPopOut(out tsl, out tff, out tap, out trw, out tmi, out tsa); float speed, sync; bool hit, tpstb; int flick; data.ResultPopOut(out speed, out sync, out hit, out tpstb, out flick); if (DataSender.ReturnGameMode().Equals(GameMode.Starlight)) { gameMode.text = "5L STARLIGHT"; } else if (DataSender.ReturnGameMode().Equals(GameMode.Theater2L)) { gameMode.text = "2L THEATER (L)"; } else if (DataSender.ReturnGameMode().Equals(GameMode.Theater2P)) { gameMode.text = "2L THEATER (P)"; } else if (DataSender.ReturnGameMode().Equals(GameMode.Theater4)) { gameMode.text = "4L THEATER"; } else if (DataSender.ReturnGameMode().Equals(GameMode.Theater)) { gameMode.text = "6L THEATER"; } else if (DataSender.ReturnGameMode().Equals(GameMode.Platinum)) { gameMode.text = "1L PLATINUM"; } level.text = tsl; GameMode mode = DataSender.ReturnGameMode(); if (!autoplay && mode.Equals(GameMode.Starlight) && Social.localUser.authenticated) { #if UNITY_ANDROID PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_seeing_the_starlight_at_the_stage, 100.0f, null); #elif UNITY_IOS Achievementer.ReportProgress("StarlightStage"); #endif } else if (!autoplay && (mode.Equals(GameMode.Theater) || mode.Equals(GameMode.Theater4) || mode.Equals(GameMode.Theater2L) || mode.Equals(GameMode.Theater2P)) && Social.localUser.authenticated) { #if UNITY_ANDROID PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_nice_days_to_go_to_the_theater, 100.0f, null); #elif UNITY_IOS Achievementer.ReportProgress("TheaterDays"); #endif } else if (!autoplay && mode.Equals(GameMode.Platinum) && Social.localUser.authenticated) { #if UNITY_ANDROID PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_platinum_on_stage, 100.0f, null); #elif UNITY_IOS Achievementer.ReportProgress("PlatinumOnStage"); #endif } if (!autoplay && allNote >= 300 && pc > 100 && Social.localUser.authenticated) { #if UNITY_ANDROID if (tpstb) { PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_percentile_ignored, 100.0f, null); } else { PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_should_not_be_happened, 100.0f, null); } #elif UNITY_IOS if (tpstb) { Achievementer.ReportProgress("percentile"); } else { Achievementer.ReportProgress("notbehappened"); } #endif } if (Social.localUser.authenticated) { #if UNITY_ANDROID PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_thank_you, 1, null); #elif UNITY_IOS Achievementer.ReportProgress("thankyou", 1.0f); #endif } StartCoroutine(ShowAchieveText()); }