質問編集履歴
1
更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,11 +8,13 @@
|
|
8
8
|
|
9
9
|
``````````````````````````````````````````````````````
|
10
10
|
|
11
|
-
void OnTriggerStay(Collider other)
|
11
|
+
void OnTriggerStay2D(Collider other)
|
12
|
-
|
12
|
+
|
13
|
-
{
|
13
|
+
{
|
14
|
+
|
14
|
-
|
15
|
+
Debug.Log(other.gameObject.name);
|
16
|
+
|
15
|
-
if (other.gameObject.
|
17
|
+
if (other.gameObject.name == "Warp1")
|
16
18
|
|
17
19
|
{
|
18
20
|
|
@@ -38,6 +40,8 @@
|
|
38
40
|
|
39
41
|
|
40
42
|
|
43
|
+
|
44
|
+
|
41
45
|
public class Player : MonoBehaviour
|
42
46
|
|
43
47
|
{
|
@@ -178,11 +182,13 @@
|
|
178
182
|
|
179
183
|
|
180
184
|
|
181
|
-
void OnTriggerStay(Collider other)
|
185
|
+
void OnTriggerStay2D(Collider other)
|
182
|
-
|
186
|
+
|
183
|
-
{
|
187
|
+
{
|
188
|
+
|
184
|
-
|
189
|
+
Debug.Log(other.gameObject.name);
|
190
|
+
|
185
|
-
if (other.gameObject.
|
191
|
+
if (other.gameObject.name == "Warp1")
|
186
192
|
|
187
193
|
{
|
188
194
|
|
@@ -194,6 +200,10 @@
|
|
194
200
|
|
195
201
|
}
|
196
202
|
|
203
|
+
}
|
204
|
+
|
205
|
+
|
206
|
+
|
197
207
|
```
|
198
208
|
|
199
209
|
オブジェクトWarp1は、TileMapのオブジェクトで、親オブジェクトはGridです。
|