void OnTriggerEnter2D (Collider2D other )
{
if (other.gameObject.tag == "red") {
GetComponent<BoxCollider2D>().isTrigger=true;
respawn = GameObject.FindWithTag("blue");
}
if (other.gameObject.tag == "blue")
{
}
}
How can I set the other object with different tag ?
I wanna pass on the red tag and Collide on the blue tag.
Just like the color switch thing