private void OnCollisionEnter(Collision collision) { if (collision.collider.CompareTag("GapTrigger")) { var otherGameobject = collision.gameObject; otherGameobject.SetActive(false); blockSpawner.Notify(collision.gameObject); } if (collision.collider.CompareTag("Obstacle")) { movementScript.enabled = false; FindObjectOfType <GameManager>().GameOver(); } }