private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "block" && flag == false) { transform.gameObject.SetActive(false); global.LineOver(); } if (collision.tag == "GameOverBlock") { flag = true; transform.gameObject.SetActive(true); global.LineNotOver(); } }