/// <summary> /// ResultPopUpの生成 /// </summary> public void GenerateResultPopUp(int score) { //ResultPopUpを生成 ResultPopUp resultPopUp = Instantiate(resultPopUpPrefab, canvasTran, false); //ResultPopUpの設定を行う resultPopUp.SetUpResultPopUp(score); }
////* ここからメソッドを1つ追加 *//// /// <summary> /// リザルトポップアップを生成 /// </summary> /// <param name="isClear"></param> /// <returns></returns> private IEnumerator GenerateResultPopUp(bool isClear = false) { // ステージクリアやゲームオーバーの文字が画面にすべて表示されるのを待つ yield return(new WaitForSeconds(2.0f)); // リザルトポップアップを生成 ResultPopUp resultPopUp = Instantiate(resultPopUpPrefab, canvasTran, false); // リザルトポップアップを設定 resultPopUp.SetUpResultPopUp(this, money, currentTime, charaBall.Hp, isClear); }
/// <summary> /// ゴール到着 /// </summary> public void Goal(int score) { isGameUp = true; // クリアの曲再生 StartCoroutine(audioManager.PlayBGM(2)); //GameObject resultPopUp = Instantiate(ResultPopUpPrefab, canvasTran, false); //resultPopUp.GetComponent<ResultPopUp>().SetUpResultPopUp(score); ResultPopUp resultPopUp = Instantiate(resultPopUpPrefab, canvasTran, false); resultPopUp.SetUpResultPopUp(score); }
/// <summary> /// ResultPopUpを生成 /// </summary> /// <param name="score"></param> public void GenerateRusultPopUp(int score) { ResultPopUp resultPopUp = Instantiate(resultPopUpPrefab, canvasTran, false); resultPopUp.SetUpResultPopUp(score); }