質問編集履歴
1
省略して if(l==0)とif(l=1)の場合しかのせなかったので追加します。
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,6 +36,10 @@
|
|
36
36
|
|
37
37
|
```ここに言語名を入力
|
38
38
|
|
39
|
+
省略して if(l==0)とif(l=1)の場合しかのせなかったので追加します。
|
40
|
+
|
41
|
+
|
42
|
+
|
39
43
|
void Start()
|
40
44
|
|
41
45
|
{
|
@@ -88,6 +92,166 @@
|
|
88
92
|
|
89
93
|
}
|
90
94
|
|
95
|
+
if (l == 2)
|
96
|
+
|
97
|
+
{
|
98
|
+
|
99
|
+
if (gameObject.CompareTag("Ball3"))
|
100
|
+
|
101
|
+
{
|
102
|
+
|
103
|
+
m = Random.Range(-9.5f, 9.5f);
|
104
|
+
|
105
|
+
n = Random.Range(-5.0f, 5.0f);
|
106
|
+
|
107
|
+
o = Random.Range(-10.0f, -10.0f);
|
108
|
+
|
109
|
+
Camera.main.transform.position = new Vector3(m, n, o);
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
if (l == 3)
|
116
|
+
|
117
|
+
{
|
118
|
+
|
119
|
+
if (gameObject.CompareTag("Ball4"))
|
120
|
+
|
121
|
+
{
|
122
|
+
|
123
|
+
m = Random.Range(-9.5f, 9.5f);
|
124
|
+
|
125
|
+
n = Random.Range(-5.0f, 5.0f);
|
126
|
+
|
127
|
+
o = Random.Range(-10.0f, -10.0f);
|
128
|
+
|
129
|
+
Camera.main.transform.position = new Vector3(m, n, o);
|
130
|
+
|
131
|
+
}
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
if (l == 4)
|
136
|
+
|
137
|
+
{
|
138
|
+
|
139
|
+
if (gameObject.CompareTag("Ball5"))
|
140
|
+
|
141
|
+
{
|
142
|
+
|
143
|
+
m = Random.Range(-9.5f, 9.5f);
|
144
|
+
|
145
|
+
n = Random.Range(-5.0f, 5.0f);
|
146
|
+
|
147
|
+
o = Random.Range(-10.0f, -10.0f);
|
148
|
+
|
149
|
+
Camera.main.transform.position = new Vector3(m, n, o);
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
if (l == 5)
|
156
|
+
|
157
|
+
{
|
158
|
+
|
159
|
+
if (gameObject.CompareTag("Ball6"))
|
160
|
+
|
161
|
+
{
|
162
|
+
|
163
|
+
m = Random.Range(-9.5f, 9.5f);
|
164
|
+
|
165
|
+
n = Random.Range(-5.0f, 5.0f);
|
166
|
+
|
167
|
+
o = Random.Range(-10.0f, -10.0f);
|
168
|
+
|
169
|
+
Camera.main.transform.position = new Vector3(m, n, o);
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
if (l == 6)
|
176
|
+
|
177
|
+
{
|
178
|
+
|
179
|
+
if (gameObject.CompareTag("Ball7"))
|
180
|
+
|
181
|
+
{
|
182
|
+
|
183
|
+
m = Random.Range(-9.5f, 9.5f);
|
184
|
+
|
185
|
+
n = Random.Range(-5.0f, 5.0f);
|
186
|
+
|
187
|
+
o = Random.Range(-10.0f, -10.0f);
|
188
|
+
|
189
|
+
Camera.main.transform.position = new Vector3(m, n, o);
|
190
|
+
|
191
|
+
}
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
if (l == 7)
|
196
|
+
|
197
|
+
{
|
198
|
+
|
199
|
+
if (gameObject.CompareTag("Ball8"))
|
200
|
+
|
201
|
+
{
|
202
|
+
|
203
|
+
m = Random.Range(-9.5f, 9.5f);
|
204
|
+
|
205
|
+
n = Random.Range(-5.0f, 5.0f);
|
206
|
+
|
207
|
+
o = Random.Range(-10.0f, -10.0f);
|
208
|
+
|
209
|
+
Camera.main.transform.position = new Vector3(m, n, o);
|
210
|
+
|
211
|
+
}
|
212
|
+
|
213
|
+
}
|
214
|
+
|
215
|
+
if (l == 8)
|
216
|
+
|
217
|
+
{
|
218
|
+
|
219
|
+
if (gameObject.CompareTag("Ball9"))
|
220
|
+
|
221
|
+
{
|
222
|
+
|
223
|
+
m = Random.Range(-9.5f, 9.5f);
|
224
|
+
|
225
|
+
n = Random.Range(-5.0f, 5.0f);
|
226
|
+
|
227
|
+
o = Random.Range(-10.0f, -10.0f);
|
228
|
+
|
229
|
+
Camera.main.transform.position = new Vector3(m, n, o);
|
230
|
+
|
231
|
+
}
|
232
|
+
|
233
|
+
}
|
234
|
+
|
235
|
+
if (l == 9)
|
236
|
+
|
237
|
+
{
|
238
|
+
|
239
|
+
if (gameObject.CompareTag("Ball10"))
|
240
|
+
|
241
|
+
{
|
242
|
+
|
243
|
+
m = Random.Range(-9.5f, 9.5f);
|
244
|
+
|
245
|
+
n = Random.Range(-5.0f, 5.0f);
|
246
|
+
|
247
|
+
o = Random.Range(-10.0f, -10.0f);
|
248
|
+
|
249
|
+
Camera.main.transform.position = new Vector3(m, n, o);
|
250
|
+
|
251
|
+
}
|
252
|
+
|
253
|
+
}
|
254
|
+
|
91
255
|
++l;
|
92
256
|
|
93
257
|
} while (l < 9);
|