collision now uses 2d colliders
This commit is contained in:
parent
6be4f03e6a
commit
5c3552d1a0
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ public class Player : Mob {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCollisionEnter(Collision collision)
|
private void OnCollisionEnter2D(Collision2D collision)
|
||||||
{
|
{
|
||||||
Debug.Log("Collision");
|
Debug.Log("Collision");
|
||||||
if (collision.collider.tag == "wall") {
|
if (collision.collider.tag == "wall") {
|
||||||
|
@ -17,7 +17,7 @@ public class Player : Mob {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter2D(Collider2D other)
|
||||||
{
|
{
|
||||||
if (other.tag == "door") {
|
if (other.tag == "door") {
|
||||||
Debug.Log("Open door");
|
Debug.Log("Open door");
|
||||||
|
|
Loading…
Add table
Reference in a new issue