fuck
This commit is contained in:
parent
3cc55a9b74
commit
54b6c3115c
|
@ -80,4 +80,15 @@ public class PlayerMovement : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnCollisionStay2D(Collision2D collision)
|
||||||
|
{
|
||||||
|
Debug.Log("Hit other " + collision.otherCollider.gameObject.name);
|
||||||
|
Debug.Log("Hit other " + collision.collider.gameObject.name);
|
||||||
|
if (collision.collider.gameObject.CompareTag("Enemy"))
|
||||||
|
{ // Other object is an enemy
|
||||||
|
Debug.Log("Hit enememenemy");
|
||||||
|
hp.TakeDamage(1f);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue