1
0
Fork 0

collision now uses 2d colliders

This commit is contained in:
Jan 2018-04-21 20:13:58 +02:00
parent 6be4f03e6a
commit 5c3552d1a0

View file

@ -9,7 +9,7 @@ public class Player : Mob {
}
private void OnCollisionEnter(Collision collision)
private void OnCollisionEnter2D(Collision2D collision)
{
Debug.Log("Collision");
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") {
Debug.Log("Open door");