IEnumerator ResultAnim() { isPlayGame = false; player.canInput = false; //スコアの計算 score = CalcScore(); yield return(new WaitForSeconds(2)); //リザルトを表示 resultPanel.gameObject.SetActive(true); if (player.isDeath) { AudioManager.Play(SEType.Game_Over); } else { AudioManager.Play(SEType.Clear_Goal); } //順位発表 RankingManager.LoadRanking(); RankingManager.SetRankData(score); RankingManager.SaveRanking(); //スコアをアニメーション yield return(StartCoroutine("ScoreCount", 5f)); //早さ var rank = RankingManager.GetRank(score); if (rank < 3) { rankImage.enabled = true; rankImage.sprite = rankSprList[rank]; } }