今作り途中のクイズゲームで3問出した後スコア画面に飛ぶようにしたいので、このScriptを問題(Scene)全てにつけビルドセッティングスもやりました、ですが問題はループしたままで止まりません。どうすればいいかご教授お願いします????ちなみに今は五秒おきにSceneが変わるようになっています。なのでそのプログラムがループして五秒おきにランダムなScene(問題)には飛ぶのですが、このScriptは思った通りに動きません????。
C#
1using System.Collections; 2using System.Collections.Generic; 3using UnityEngine; 4using UnityEngine.SceneManagement; 5 6public class mondaiNo : MonoBehaviour 7{ 8 public bool one; 9 public bool two; 10 public bool three; 11 // Start is called before the first frame update 12 void Start() 13 { 14 if (one == true) 15 { 16 if (two == true) 17 { 18 if (three == true) 19 { 20 SceneManager.LoadScene("Score"); 21 } 22 else 23 { 24 three = true; 25 } 26 } else { 27 two = true; 28 } 29 } else { 30 one = true; 31 } 32 } 33 34 // Update is called once per frame 35 void Update() 36 { 37 38 } 39} 40
csharpでboolのデフォルトはfalseなので、スタートとともにoneだけがtrueになると思うのですが、コードが断片的なのでやりたいことが理解できません。ループしているあたりとかtrueになる部分の箇所とかのコードを追記していただけませんか?