// Start is called before the first frame update void Start() { debugQuestionTime = GameObject.Find("QuestionTime"); //出題中カウント用のオブジェクトをひっぱる at = GameObject.Find("ThendBear").GetComponent <CharacterTest>(); debugQTText = GetComponentInChildren <Text>(); }
/// <summary> /// 成功したか失敗したかを、ゲームを管理するクラスからこいつへ教えてあげる /// </summary> /// <param name="success"></param> /// public void Start() { GameObject comboTextObj = GameObject.Find("comboCount"); GameObject scoreTextObj = GameObject.Find("score"); comboText = comboTextObj.GetComponentInChildren <Text>(); scoreText = scoreTextObj.GetComponentInChildren <Text>(); Debug.Log(comboText); Debug.Log(scoreText); at = GameObject.Find("ThendBear").GetComponent <CharacterTest>(); ctj = GameObject.Find("correctTimeJudge"); }
/// <summary> /// 成功したか失敗したかを、ゲームを管理するクラスからこいつへ教えてあげる /// </summary> /// <param name="success"></param> /// public void Start() { //コンボカウントしてるオブジェクトと、スコア表示のオブジェクトの取得 GameObject comboTextObj = GameObject.Find("comboCount"); GameObject scoreTextObj = GameObject.Find("score"); //テキスト乗っ取り comboText = comboTextObj.GetComponentInChildren <Text>(); scoreText = scoreTextObj.GetComponentInChildren <Text>(); Debug.Log(comboText); Debug.Log(scoreText); //他のスクリプトの要素を、ゲームオブジェクトのコンポーネント取得で操作 at = GameObject.Find("ThendBear").GetComponent <CharacterTest>(); //正解時間判定でテキストを上書く用のゲームオブジェクトを取得 //テキストを上書いて、Great、Goodなどやってたが、本番ではPrefabごとに作るので不要 ctj = GameObject.Find("correctTimeJudge"); }