void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.tag == "Despawner") //don't destroy if its the player's collider { Destroy(gameObject); } if (other.gameObject.tag == "Player") { spawner.CheckWordCollision(gameObject); } }
void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.tag == "Despawner") //don't destroy if its the player's collider { Destroy(gameObject); } if (other.gameObject.tag == "Player") { spawner.CheckWordCollision(gameObject); } }