private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.CompareTag("Player")) { colorTest.KillPlayer(collision.gameObject, gameObject.tag); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.CompareTag("Player") || collision.gameObject.CompareTag("FreePlayer")) { transitionAnim.SetTrigger("death"); print("Platform Text: " + collision.gameObject.name + " " + collision.gameObject.tag); colorTest.KillPlayer(collision.gameObject, gameObject.tag); } }