質問編集履歴
3
注釈を追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -168,6 +168,7 @@
|
|
168
168
|
|
169
169
|
```
|
170
170
|
|
171
|
+
※コードで仕込んだログ結果も。
|
171
172
|

|
172
173
|
|
173
174
|

|
2
コードを修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -23,18 +23,18 @@
|
|
23
23
|
using System.Collections;
|
24
24
|
using System.Collections.Generic;
|
25
25
|
using UnityEngine;
|
26
|
-
using UnityEngine.UI;
|
26
|
+
using UnityEngine.UI;
|
27
27
|
|
28
28
|
public class Judge : MonoBehaviour
|
29
29
|
{
|
30
|
-
public GameObject p1_G;
|
30
|
+
public GameObject p1_G;
|
31
31
|
public GameObject p1_C;
|
32
32
|
public GameObject p1_P;
|
33
33
|
public GameObject p2_G;
|
34
34
|
public GameObject p2_C;
|
35
35
|
public GameObject p2_P;
|
36
|
-
public Text text_result;
|
36
|
+
public Text text_result;
|
37
|
-
public GameObject win_effect;
|
37
|
+
public GameObject win_effect;
|
38
38
|
public GameObject lose_effect;
|
39
39
|
// Start is called before the first frame update
|
40
40
|
void Start()
|
@@ -49,23 +49,22 @@
|
|
49
49
|
}
|
50
50
|
public void OnClick()
|
51
51
|
{
|
52
|
-
// 何が表示されているかを確認
|
52
|
+
// MeshRenderの状態を見て何が表示されているかを確認
|
53
|
-
// クリックされた時にMeshRenderの状態を確認する処理
|
54
|
-
Renderer ren_p1_G = p1_G.GetComponent<Renderer>();
|
53
|
+
Renderer ren_p1_G = p1_G.GetComponent<Renderer>();
|
55
54
|
Renderer ren_p1_C = p1_C.GetComponent<Renderer>();
|
56
55
|
Renderer ren_p1_P = p1_P.GetComponent<Renderer>();
|
57
56
|
Renderer ren_p2_G = p2_G.GetComponent<Renderer>();
|
58
57
|
Renderer ren_p2_C = p2_C.GetComponent<Renderer>();
|
59
58
|
Renderer ren_p2_P = p2_P.GetComponent<Renderer>();
|
60
|
-
|
59
|
+
|
61
|
-
// 何を出したのかを文字列で取得する
|
62
60
|
// それぞれのカードを入れる変数を初期化
|
63
61
|
string result_p1 = "";
|
64
62
|
string result_p2 = "";
|
63
|
+
|
65
64
|
// 何が表示されているか判定
|
66
|
-
if(ren_p1_G.enabled == true) //
|
65
|
+
if(ren_p1_G.enabled == true) // player1にグーが選ばれていた場合
|
67
66
|
{
|
68
|
-
result_p1 = "G";
|
67
|
+
result_p1 = "G";
|
69
68
|
Debug.Log("result_p1 is %s \n" + result_p1);
|
70
69
|
Debug.Log("result_p2 is %s \n" + result_p2);
|
71
70
|
}
|
@@ -110,8 +109,8 @@
|
|
110
109
|
else if (result_p2 == "C")
|
111
110
|
{
|
112
111
|
text_result.text = "p1の勝ち";
|
113
|
-
Instantiate(win_effect, p1_G.transform.position, p1_G.transform.rotation);
|
112
|
+
Instantiate(win_effect, p1_G.transform.position, p1_G.transform.rotation);
|
114
|
-
Instantiate(lose_effect, p2_C.transform.position, p2_C.transform.rotation);
|
113
|
+
Instantiate(lose_effect, p2_C.transform.position, p2_C.transform.rotation);
|
115
114
|
}
|
116
115
|
else if (result_p2 == "P")
|
117
116
|
{
|
1
タイトルの変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
【Unity】認識したARマーカー上にエフェクト(パーティクル)を表示できない
|
body
CHANGED
File without changes
|