質問編集履歴
1
下にチャレンジ1と2で試したコードです。両方赤の波線がつきました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -59,3 +59,53 @@
|
|
59
59
|
|
60
60
|
|
61
61
|
```
|
62
|
+
|
63
|
+
チャレンジ1
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
public bool IsAnswerCorrect()
|
68
|
+
|
69
|
+
{
|
70
|
+
|
71
|
+
Bottun answer = targetObject1.GetComponent<Bottun>();
|
72
|
+
|
73
|
+
QuestionManager Qm = targetObject2.GetComponent<QuestionManager>();
|
74
|
+
|
75
|
+
var answer1 = answer.GetSuujiText();
|
76
|
+
|
77
|
+
var answer2 = Qm.GetCurrentQuestionData().GetAnswer();
|
78
|
+
|
79
|
+
answer1.Equals(answer2)
|
80
|
+
|
81
|
+
return Debug.Log(answer2);
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
チャレンジ2
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
public bool IsAnswerCorrect()
|
92
|
+
|
93
|
+
{
|
94
|
+
|
95
|
+
Bottun answer = targetObject1.GetComponent<Bottun>();
|
96
|
+
|
97
|
+
QuestionManager Qm = targetObject2.GetComponent<QuestionManager>();
|
98
|
+
|
99
|
+
var answer1 = answer.GetSuujiText();
|
100
|
+
|
101
|
+
var answer2 = Qm.GetCurrentQuestionData().GetAnswer();
|
102
|
+
|
103
|
+
Debug.Log(answer2);
|
104
|
+
|
105
|
+
return answer1.Equals(answer2);
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
コード
|
110
|
+
|
111
|
+
```
|