Commit a5074f8d by Tim Reiter

players are now colliding.

parent d9140ec0
...@@ -7,10 +7,8 @@ public class Trap : MonoBehaviour { ...@@ -7,10 +7,8 @@ public class Trap : MonoBehaviour {
void OnTriggerEnter2D(Collider2D other) void OnTriggerEnter2D(Collider2D other)
{ {
Debug.Log("trigg");
if (other.tag == "Player") if (other.tag == "Player")
{ {
Debug.Log("player col");
other.GetComponent<PlayerHealth>().changeHealthBy(-damagePoints); other.GetComponent<PlayerHealth>().changeHealthBy(-damagePoints);
transform.position = new Vector2(50, 50);//TODO setze auf 1000 oder so, zur sicherheit. transform.position = new Vector2(50, 50);//TODO setze auf 1000 oder so, zur sicherheit.
} }
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment