From 5c3552d1a04c2aba3d563302833af5153b56c4b7 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 21 Apr 2018 20:13:58 +0200 Subject: [PATCH] collision now uses 2d colliders --- Assets/Scripts/Entities/Player.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Entities/Player.cs b/Assets/Scripts/Entities/Player.cs index ceae2f0..74d9968 100644 --- a/Assets/Scripts/Entities/Player.cs +++ b/Assets/Scripts/Entities/Player.cs @@ -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");