質問編集履歴
3
質問ヲ捕捉しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -498,7 +498,7 @@
|
|
498
498
|
|
499
499
|
else if (raianpoint == 3)
|
500
500
|
|
501
|
-
|
501
|
+
いただきたいです。
|
502
502
|
|
503
503
|
Instantiate(anzaione, new Vector3(0f, -1.691702f, 6.086083f), Quaternion.identity);
|
504
504
|
|
@@ -540,7 +540,7 @@
|
|
540
540
|
|
541
541
|
```
|
542
542
|
|
543
|
-
|
543
|
+
anzaiとanzansiが表示されている場合というところに注目していただきたいのですが、
|
544
544
|
|
545
545
|
このコードでraianpoint==3のときとruipoint==4のときの
|
546
546
|
|
2
コードを増やしました
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,10 +2,178 @@
|
|
2
2
|
|
3
3
|
```C#
|
4
4
|
|
5
|
+
using System.Collections;
|
6
|
+
|
7
|
+
using System.Collections.Generic;
|
8
|
+
|
9
|
+
using UnityEngine;
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
public class POS1 : MonoBehaviour
|
14
|
+
|
15
|
+
{
|
16
|
+
|
17
|
+
//変数を受け取るスクリプト
|
18
|
+
|
19
|
+
public movebar moveBAR;
|
20
|
+
|
21
|
+
public modelclickA modelClickA;
|
22
|
+
|
23
|
+
public modelclickB modelClickB;
|
24
|
+
|
25
|
+
public modelclickC modelClickC;
|
26
|
+
|
27
|
+
public modelclickD modelClickD;
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
//表示するボタン
|
34
|
+
|
35
|
+
public GameObject movetxt;
|
36
|
+
|
37
|
+
public GameObject menubar;
|
38
|
+
|
39
|
+
public GameObject POS;
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
//機能モデル
|
46
|
+
|
47
|
+
public GameObject anzy;
|
48
|
+
|
49
|
+
public GameObject anzaingo;
|
50
|
+
|
51
|
+
public GameObject koyohan;
|
52
|
+
|
53
|
+
public GameObject koyokun;
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
//動作させるanzai
|
60
|
+
|
61
|
+
public GameObject anzaione;
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
//動作させるkoyo
|
68
|
+
|
69
|
+
public GameObject koyoone;
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
public void Click()
|
78
|
+
|
79
|
+
{
|
80
|
+
|
81
|
+
//anzyppointの取得
|
82
|
+
|
83
|
+
int anzypoint;
|
84
|
+
|
85
|
+
anzypoint = moveBAR.Getanzypoint();
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
//senpaipointの取得
|
92
|
+
|
93
|
+
int senpaipoint;
|
94
|
+
|
95
|
+
senpaipoint = moveBAR.Getsenpaipoint();
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
//anisyuwarudaの取得
|
102
|
+
|
103
|
+
int anisyuwaruda;
|
104
|
+
|
105
|
+
anisyuwaruda = moveBAR.Getanisyuwaruda();
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
//ruipointの取得
|
112
|
+
|
113
|
+
int ruipoint;
|
114
|
+
|
115
|
+
ruipoint = modelClickA.Getruipoint();
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
//raianpointの取得
|
122
|
+
|
123
|
+
int raianpoint;
|
124
|
+
|
125
|
+
raianpoint = modelClickB.Getraianpoint();
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
//kikopointの取得
|
130
|
+
|
131
|
+
int kikopoint;
|
132
|
+
|
133
|
+
kikopoint = modelClickC.Getkikopoint();
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
//kinositapointの取得
|
140
|
+
|
141
|
+
int kinositapoint;
|
142
|
+
|
143
|
+
kinositapoint = modelClickD.Getkinositapoint();
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
//anzaiのみ表示されていた場合
|
152
|
+
|
5
|
-
|
153
|
+
if (anzypoint == 1)
|
6
154
|
|
7
155
|
{
|
8
156
|
|
157
|
+
Instantiate(anzaione, new Vector3(-5f, -1.4f, 6.086083f), Quaternion.identity);
|
158
|
+
|
159
|
+
POS.SetActive(false);
|
160
|
+
|
161
|
+
anzy.SetActive(false);
|
162
|
+
|
163
|
+
menubar.SetActive(true);
|
164
|
+
|
165
|
+
}
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
//anzaiとanzansiが表示されていた場合
|
172
|
+
|
173
|
+
else if (anzypoint == 2)
|
174
|
+
|
175
|
+
{
|
176
|
+
|
9
177
|
if (ruipoint == 1)
|
10
178
|
|
11
179
|
{
|
@@ -84,6 +252,292 @@
|
|
84
252
|
|
85
253
|
}
|
86
254
|
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
//koyoが表示されていた場合
|
260
|
+
|
261
|
+
else if (senpaipoint == 1)
|
262
|
+
|
263
|
+
{
|
264
|
+
|
265
|
+
Instantiate(koyoone, new Vector3(-2f, -1.691702f, 6.086083f), Quaternion.identity);
|
266
|
+
|
267
|
+
POS.SetActive(false);
|
268
|
+
|
269
|
+
koyohan.SetActive(false);
|
270
|
+
|
271
|
+
menubar.SetActive(true);
|
272
|
+
|
273
|
+
}
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
//koyoとkoyosanが表示されていた場合
|
278
|
+
|
279
|
+
else if (senpaipoint == 2)
|
280
|
+
|
281
|
+
{
|
282
|
+
|
283
|
+
if (kikopoint == 1)
|
284
|
+
|
285
|
+
{
|
286
|
+
|
287
|
+
Instantiate(koyoone, new Vector3(-2f, -1.691702f, 6.086083f), Quaternion.identity);
|
288
|
+
|
289
|
+
POS.SetActive(false);
|
290
|
+
|
291
|
+
koyohan.SetActive(false);
|
292
|
+
|
293
|
+
movetxt.SetActive(true);
|
294
|
+
|
295
|
+
kinositapoint = 3;
|
296
|
+
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
else if (kinositapoint == 2)
|
304
|
+
|
305
|
+
{
|
306
|
+
|
307
|
+
Instantiate(koyoone, new Vector3(-2f, -1.691702f, 6.086083f), Quaternion.identity);
|
308
|
+
|
309
|
+
POS.SetActive(false);
|
310
|
+
|
311
|
+
koyokun.SetActive(false);
|
312
|
+
|
313
|
+
movetxt.SetActive(true);
|
314
|
+
|
315
|
+
kikopoint = 4;
|
316
|
+
|
317
|
+
}
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
else if (kinositapoint == 3)
|
324
|
+
|
325
|
+
{
|
326
|
+
|
327
|
+
Instantiate(koyoone, new Vector3(0f, -1.691702f, 6.086083f), Quaternion.identity);
|
328
|
+
|
329
|
+
POS.SetActive(false);
|
330
|
+
|
331
|
+
koyokun.SetActive(false);
|
332
|
+
|
333
|
+
movetxt.SetActive(false);
|
334
|
+
|
335
|
+
menubar.SetActive(true);
|
336
|
+
|
337
|
+
}
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
else if (kikopoint == 4)
|
344
|
+
|
345
|
+
{
|
346
|
+
|
347
|
+
Instantiate(koyoone, new Vector3(0f, -1.691702f, 6.086083f), Quaternion.identity);
|
348
|
+
|
349
|
+
POS.SetActive(false);
|
350
|
+
|
351
|
+
koyohan.SetActive(false);
|
352
|
+
|
353
|
+
movetxt.SetActive(false);
|
354
|
+
|
355
|
+
menubar.SetActive(true);
|
356
|
+
|
357
|
+
}
|
358
|
+
|
359
|
+
}
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
//anzaiとkoyoが表示されていた場合
|
366
|
+
|
367
|
+
else if (anisyuwaruda == 1)
|
368
|
+
|
369
|
+
{
|
370
|
+
|
371
|
+
if (ruipoint == 1)
|
372
|
+
|
373
|
+
{
|
374
|
+
|
375
|
+
Instantiate(anzaione, new Vector3(-4f, -1.691702f, 6.086083f), Quaternion.identity);
|
376
|
+
|
377
|
+
POS.SetActive(false);
|
378
|
+
|
379
|
+
anzy.SetActive(false);
|
380
|
+
|
381
|
+
movetxt.SetActive(true);
|
382
|
+
|
383
|
+
kinositapoint = 3;
|
384
|
+
|
385
|
+
}
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
else if (kinositapoint == 2)
|
392
|
+
|
393
|
+
{
|
394
|
+
|
395
|
+
Instantiate(koyoone, new Vector3(-2f, -1.691702f, 6.086083f), Quaternion.identity);
|
396
|
+
|
397
|
+
POS.SetActive(false);
|
398
|
+
|
399
|
+
koyokun.SetActive(false);
|
400
|
+
|
401
|
+
movetxt.SetActive(true);
|
402
|
+
|
403
|
+
ruipoint = 4;
|
404
|
+
|
405
|
+
}
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
else if (kinositapoint == 3)
|
412
|
+
|
413
|
+
{
|
414
|
+
|
415
|
+
Instantiate(koyoone, new Vector3(0f, -1.691702f, 6.086083f), Quaternion.identity);
|
416
|
+
|
417
|
+
POS.SetActive(false);
|
418
|
+
|
419
|
+
koyokun.SetActive(false);
|
420
|
+
|
421
|
+
movetxt.SetActive(false);
|
422
|
+
|
423
|
+
menubar.SetActive(true);
|
424
|
+
|
425
|
+
}
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
else if (ruipoint == 4)
|
432
|
+
|
433
|
+
{
|
434
|
+
|
435
|
+
Instantiate(anzaione, new Vector3(0f, -1.691702f, 6.086083f), Quaternion.identity);
|
436
|
+
|
437
|
+
POS.SetActive(false);
|
438
|
+
|
439
|
+
anzy.SetActive(false);
|
440
|
+
|
441
|
+
movetxt.SetActive(false);
|
442
|
+
|
443
|
+
menubar.SetActive(true);
|
444
|
+
|
445
|
+
}
|
446
|
+
|
447
|
+
}
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
//koyoとanzansiが表示されていた場合
|
454
|
+
|
455
|
+
else if (anisyuwaruda == 2)
|
456
|
+
|
457
|
+
{
|
458
|
+
|
459
|
+
if (kikopoint == 1)
|
460
|
+
|
461
|
+
{
|
462
|
+
|
463
|
+
Instantiate(koyoone, new Vector3(-2f, -1.691702f, 6.086083f), Quaternion.identity);
|
464
|
+
|
465
|
+
POS.SetActive(false);
|
466
|
+
|
467
|
+
koyohan.SetActive(false);
|
468
|
+
|
469
|
+
movetxt.SetActive(true);
|
470
|
+
|
471
|
+
raianpoint = 3;
|
472
|
+
|
473
|
+
}
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
else if (raianpoint == 2)
|
480
|
+
|
481
|
+
{
|
482
|
+
|
483
|
+
Instantiate(anzaione, new Vector3(-2f, -1.691702f, 6.086083f), Quaternion.identity);
|
484
|
+
|
485
|
+
POS.SetActive(false);
|
486
|
+
|
487
|
+
anzaingo.SetActive(false);
|
488
|
+
|
489
|
+
movetxt.SetActive(true);
|
490
|
+
|
491
|
+
kikopoint = 4;
|
492
|
+
|
493
|
+
}
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
else if (raianpoint == 3)
|
500
|
+
|
501
|
+
{
|
502
|
+
|
503
|
+
Instantiate(anzaione, new Vector3(0f, -1.691702f, 6.086083f), Quaternion.identity);
|
504
|
+
|
505
|
+
POS.SetActive(false);
|
506
|
+
|
507
|
+
anzaingo.SetActive(false);
|
508
|
+
|
509
|
+
movetxt.SetActive(false);
|
510
|
+
|
511
|
+
menubar.SetActive(true);
|
512
|
+
|
513
|
+
}
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
else if (kikopoint == 4)
|
520
|
+
|
521
|
+
{
|
522
|
+
|
523
|
+
Instantiate(koyoone, new Vector3(0f, -1.691702f, 6.086083f), Quaternion.identity);
|
524
|
+
|
525
|
+
POS.SetActive(false);
|
526
|
+
|
527
|
+
koyohan.SetActive(false);
|
528
|
+
|
529
|
+
movetxt.SetActive(false);
|
530
|
+
|
531
|
+
menubar.SetActive(true);
|
532
|
+
|
533
|
+
}
|
534
|
+
|
535
|
+
}
|
536
|
+
|
537
|
+
}
|
538
|
+
|
539
|
+
}
|
540
|
+
|
87
541
|
```
|
88
542
|
|
89
543
|
|
1
SetActuvをSetActiveに直しました
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Unity SetAct
|
1
|
+
Unity SetActiveが反応してくれない
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
###SetAct
|
1
|
+
###SetActiveが反応してくれない
|
2
2
|
|
3
3
|
```C#
|
4
4
|
|