質問編集履歴
5
※1つ削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
//区別値1
|
92
92
|
|
93
|
-
private static int hitpoint1 = 1; //※
|
93
|
+
private static int hitpoint1 = 1; //※質問時のpublicからprivateに編集されています
|
94
94
|
|
95
95
|
public static int getHitPoint1(int i) //このメンバ変数を渡す
|
96
96
|
|
4
public→private
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,7 +78,7 @@
|
|
78
78
|
|
79
79
|
//区別値
|
80
80
|
|
81
|
-
private static int hitpoint = 0;
|
81
|
+
private static int hitpoint = 0; //※質問時のpublicからprivateに編集されています
|
82
82
|
|
83
83
|
public static int getHitPoint(int i) //このメンバ変数を渡す
|
84
84
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
//区別値1
|
92
92
|
|
93
|
-
private static int hitpoint1 = 1;
|
93
|
+
private static int hitpoint1 = 1; //※※質問時のpublicからprivateに編集されています
|
94
94
|
|
95
95
|
public static int getHitPoint1(int i) //このメンバ変数を渡す
|
96
96
|
|
3
instant→instant1
test
CHANGED
File without changes
|
test
CHANGED
@@ -62,7 +62,7 @@
|
|
62
62
|
|
63
63
|
var go = hitInfo.collider.gameObject;
|
64
64
|
|
65
|
-
int i = hitpoint1; //区別値1 ※質問時のinstantからiに編集されています
|
65
|
+
int i = hitpoint1; //区別値1 ※質問時のinstant1からiに編集されています
|
66
66
|
|
67
67
|
getHitPoint1(i); //区別値1 ※質問時のinstant1からiに編集されています
|
68
68
|
|
2
更新前の内容を記述
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,9 +44,9 @@
|
|
44
44
|
|
45
45
|
var go = hitInfo.collider.gameObject;
|
46
46
|
|
47
|
-
int i = hitpoint; //区別値
|
47
|
+
int i = hitpoint; //区別値 ※質問時のinstantからiに編集されています
|
48
|
-
|
48
|
+
|
49
|
-
getHitPoint(i); //区別値
|
49
|
+
getHitPoint(i); //区別値 ※質問時のinstantからiに編集されています
|
50
50
|
|
51
51
|
HandleHitGameObject(go); //シーン制御へ
|
52
52
|
|
@@ -62,9 +62,9 @@
|
|
62
62
|
|
63
63
|
var go = hitInfo.collider.gameObject;
|
64
64
|
|
65
|
-
int i = hitpoint1; //区別値1
|
65
|
+
int i = hitpoint1; //区別値1 ※質問時のinstantからiに編集されています
|
66
|
-
|
66
|
+
|
67
|
-
getHitPoint1(i); //区別値1
|
67
|
+
getHitPoint1(i); //区別値1 ※質問時のinstant1からiに編集されています
|
68
68
|
|
69
69
|
HandleHitGameObject(go); //シーン制御へ
|
70
70
|
|
@@ -150,9 +150,9 @@
|
|
150
150
|
|
151
151
|
|
152
152
|
|
153
|
-
int resulthit = GameManager.getHitPoint(i); //受け取る エラー
|
153
|
+
int resulthit = GameManager.getHitPoint(i); //受け取る エラー ※.getHitPoint();から.getHitPoint(i)に編集されています
|
154
|
-
|
154
|
+
|
155
|
-
int resulthit1 = GameManager.getHitPoint1(i); //受け取る エラー
|
155
|
+
int resulthit1 = GameManager.getHitPoint1(i); //受け取る エラー ※.getHitPoint1();から.getHitPoint1(i)に編集されています
|
156
156
|
|
157
157
|
|
158
158
|
|
1
1.GameManager.getHitPoint()→GameManager.getHitPoint(i)
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
シーン移動先のENEMシーン, Controller.csでは区別値によってインスタンス化する敵を分けようとしていますが、
|
8
8
|
|
9
|
-
|
9
|
+
上手く橋渡しができません。呼出元か呼出先の書き方が間違っているのでしょうか?
|
10
10
|
|
11
11
|
それと本当に遷移先でインスタンス化ができるのか不安も残ってます。
|
12
12
|
|
@@ -44,9 +44,9 @@
|
|
44
44
|
|
45
45
|
var go = hitInfo.collider.gameObject;
|
46
46
|
|
47
|
-
int i
|
47
|
+
int i = hitpoint; //区別値
|
48
|
-
|
48
|
+
|
49
|
-
getHitPoint(i
|
49
|
+
getHitPoint(i); //区別値
|
50
50
|
|
51
51
|
HandleHitGameObject(go); //シーン制御へ
|
52
52
|
|
@@ -62,9 +62,9 @@
|
|
62
62
|
|
63
63
|
var go = hitInfo.collider.gameObject;
|
64
64
|
|
65
|
-
int i
|
65
|
+
int i = hitpoint1; //区別値1
|
66
|
-
|
66
|
+
|
67
|
-
getHitPoint1(i
|
67
|
+
getHitPoint1(i); //区別値1
|
68
68
|
|
69
69
|
HandleHitGameObject(go); //シーン制御へ
|
70
70
|
|
@@ -78,29 +78,25 @@
|
|
78
78
|
|
79
79
|
//区別値
|
80
80
|
|
81
|
-
p
|
81
|
+
private static int hitpoint = 0;
|
82
|
-
|
82
|
+
|
83
|
-
public static int getHitPoint(int i
|
83
|
+
public static int getHitPoint(int i) //このメンバ変数を渡す
|
84
|
-
|
84
|
+
|
85
|
-
{
|
85
|
+
{
|
86
|
-
|
87
|
-
|
86
|
+
|
88
|
-
|
89
|
-
return i
|
87
|
+
return i;
|
90
88
|
|
91
89
|
}
|
92
90
|
|
93
91
|
//区別値1
|
94
92
|
|
95
|
-
p
|
93
|
+
private static int hitpoint1 = 1;
|
96
|
-
|
94
|
+
|
97
|
-
public static int getHitPoint1(int i
|
95
|
+
public static int getHitPoint1(int i) //このメンバ変数を渡す
|
98
|
-
|
96
|
+
|
99
|
-
{
|
97
|
+
{
|
100
|
-
|
101
|
-
|
98
|
+
|
102
|
-
|
103
|
-
return i
|
99
|
+
return i;
|
104
100
|
|
105
101
|
}
|
106
102
|
|
@@ -154,9 +150,9 @@
|
|
154
150
|
|
155
151
|
|
156
152
|
|
157
|
-
int resulthit = GameManager.getHitPoint(); //受け取る
|
153
|
+
int resulthit = GameManager.getHitPoint(i); //受け取る エラー
|
158
|
-
|
154
|
+
|
159
|
-
int resulthit1 = GameManager.getHitPoint1(); //受け取る
|
155
|
+
int resulthit1 = GameManager.getHitPoint1(i); //受け取る エラー
|
160
156
|
|
161
157
|
|
162
158
|
|
@@ -164,9 +160,9 @@
|
|
164
160
|
|
165
161
|
void Start () {
|
166
162
|
|
167
|
-
int resulthit = GameManager.getHitPoint(); //
|
163
|
+
int resulthit = GameManager.getHitPoint(); //エラー
|
168
|
-
|
164
|
+
|
169
|
-
int resulthit1 = GameManager.getHitPoint1(); //
|
165
|
+
int resulthit1 = GameManager.getHitPoint1(); //エラー
|
170
166
|
|
171
167
|
}
|
172
168
|
|
@@ -196,17 +192,13 @@
|
|
196
192
|
|
197
193
|
//エラー内容
|
198
194
|
|
199
|
-
NotImplementedException: The requested feature is not implemented.
|
200
|
-
|
201
|
-
error CS1501: No overload for method `getHitPoint1' takes `0' arguments
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
195
|
+
現在のコンテキストに'i'という名前は存在しません。
|
196
|
+
|
206
|
-
|
197
|
+
現在のコンテキストに'i'という名前は存在しません。
|
198
|
+
|
207
|
-
'
|
199
|
+
現在のコンテキストに'result'という名前は存在しません。
|
208
|
-
|
200
|
+
|
209
|
-
'
|
201
|
+
現在のコンテキストに'result1'という名前は存在しません。
|
210
202
|
|
211
203
|
|
212
204
|
|