// Use this for initialization void Start() { Text scoreLabel = GameObject.Find("Canvas/Score").GetComponent <Text>(); scoreLabel.color = Color.red; int Score = ResultMgr.GetScoreData(); scoreLabel.text = Score.ToString() + " 点"; }
// Start is called before the first frame update void Start() { //スコア表示用のゲームオブジェクトを習得 Text scoreLabel = GameObject.Find("Canvas/Text").GetComponent <Text>(); scoreLabel.color = Color.red; //グローバルに宣言したスコアをResuitMgrのスクリプトから読み込む int Score = ResultMgr.GetScoreData(); scoreLabel.text = Score.ToString() + "点"; }
public void NextQuiz() { int Score = ResultMgr.GetScoreData(); if (Application.loadedLevelName == "Result") { if (Score == 0) { qCount++; SceneManager.LoadScene("ゲームオーバー"); } else { qCount = 0; SceneManager.LoadScene("クリア"); //Application.LoadLevel ("Score"); } } }