質問編集履歴
1
更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,9 +3,10 @@
|
|
3
3
|
|
4
4
|
コードで、問題の部分
|
5
5
|
``````````````````````````````````````````````````````
|
6
|
-
|
6
|
+
void OnTriggerStay2D(Collider other)
|
7
7
|
{
|
8
|
+
Debug.Log(other.gameObject.name);
|
8
|
-
if (other.gameObject.
|
9
|
+
if (other.gameObject.name == "Warp1")
|
9
10
|
{
|
10
11
|
Debug.Log("sss");
|
11
12
|
}
|
@@ -18,6 +19,7 @@
|
|
18
19
|
using System.Collections.Generic;
|
19
20
|
using UnityEngine;
|
20
21
|
|
22
|
+
|
21
23
|
public class Player : MonoBehaviour
|
22
24
|
{
|
23
25
|
Animator animator;
|
@@ -88,14 +90,17 @@
|
|
88
90
|
}
|
89
91
|
}
|
90
92
|
|
91
|
-
void
|
93
|
+
void OnTriggerStay2D(Collider other)
|
92
94
|
{
|
95
|
+
Debug.Log(other.gameObject.name);
|
93
|
-
if (other.gameObject.
|
96
|
+
if (other.gameObject.name == "Warp1")
|
94
97
|
{
|
95
98
|
Debug.Log("sss");
|
96
99
|
}
|
97
100
|
|
98
101
|
}
|
102
|
+
}
|
103
|
+
|
99
104
|
```
|
100
105
|
オブジェクトWarp1は、TileMapのオブジェクトで、親オブジェクトはGridです。
|
101
106
|
Warp1は、IsTriggerにチェックを入れているのですり抜ける状態です。
|