private void OnTriggerEnter2D(Collider2D coll)
{
if (Input.GetKey(KeyCode.Space))
{
if (coll.gameObject.tag == "DO")
{
Destroy(coll.gameObject);
}
}
}
private void OnTriggerStay2D(Collider2D coll)
{
if (Input.GetKey(KeyCode.Space))
{
if (coll.gameObject.tag == "DO")
{
Destroy(coll.gameObject);
}
}
}